Jump to content
We've recently updated our Privacy Statement, available here ×

variable with initial value and re-use same variable?


raul.mendez
Go to solution Solved by rajesh.sirsikar,

Recommended Posts

Hi,

I'm trying to have a variable that displays the total of products, so I have the following:

Parameter: stock_initial (The quantity initial)

Variable input: stock_in (This return the quantity of an input product)

Variable output: stock_out (This return the quantity of a output product)

Initial stock43 
InputsOutputsTotal 
0103343-10=33
1504833+15=48

So I want to create a variable to get values on total column (green values), I tried to do the following but this does not work:

$V{Stock_total}:

Initial value expression: $P{stock_initial}

Variable expression: $V{stock_input} >= 0 ? ($V{Stock_total} + $V{stock_input}) : ($V{Stock_total} - $V{stock_output})

Calculation: Nothing

The variable should calculate the initial value and add or subtract of input or output and display result, for the second line the result of the variable should be used to do a new calculation. I hope someone help me.

Thank you in advance.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...