How to set Numeric Variable Condition

Does anyone know how I can set a variable to not go under a certain value?

In the example below I am using 2 numeric variables: Total and Quantity. I set the following triggers:

Numeric Variable capture

  • Adjust Total -> Add 5.99 when user clicks "+" ;
  • Adjust Total -< Subtract 5.99 when user clicks "-"

The total continues to subtract even if the value goes lower than zero. Any idea what triggers or conditions would help me solve this problem?

Thank you!

4 Replies
David Anderson

Hi Liliana!

I'm glad that suggestion helped!

I spent a little time working out an example that you might find helpful. It calculates two items at different prices. You can add and subtract as many of each item as you like. If you have no items added, then the condition will prevent your cart from displaying a negative value.

Can't wait to see your example next week!

Storyline 2 source file attached

Preview example

Liliana Cotoara

Thank you David,the example is really helpful and gave me some new ideas. I haven't worked that much with numeric variables so the ELH challenge is a good opportunity to learn and practice. To give a hint, I am building an example on McDonalds's self-checkout kiosk. Will share it soon!