Resetting a variable each time it changes

Apr 14, 2015

I'm creating a tool for sales agents to calculate a customer's cell phone rate plan (minutes, texts, data, etc.) while they're on the phone with them. The idea is that agents can see the total cost adjusted as they adjust each field. 

I made layers with a dropdown box for each field (minutes, texts, data, etc.) Each layer includes a subtotal variable for that field. The variable is set to zero each time the user goes back to the layer to choose another option. Then the price for that option is added to the variable.

I'm having trouble showing the grand total on the main slide. I set up the grand total variable to add each field subtotal variable. The problem is I can only figure out how to add the subtotals together, but if the user goes back to change an option, that new price is ADDED to the previous amount of the grand total. It doesn't reset the grand total. The number just keeps getting bigger and bigger instead of only reflecting all the new subtotals.

I want my tool to work like this example - http://dev.keypointlearn.com/xcl71_SL/Refresh/story.html, where the total amount (in green) adjusts automatically to reflect each new adjustment. Is this only possible with the slider?

4 Replies
Holly Peters

Thanks, Michael. Your example is excellent. 

I was hoping to find a solution that automatically adjusts the total every time one of the fields (subtotal variables changes).

So far, I'm setting a separate trigger to set the Grand Total variable to 0 whenever subtotal 1 changes, another for whenever subtotal 2 changes, etc. Then I have to add a separate trigger to add subtotal 1 to the grand total variable whenever subtotal variable 1 changes, whenever subtotal 2 changes, etc. And more separate triggers to add subtotal variable 2 to the grand total whenever subtotal 1 changes, subtotal 2 changes, etc. And so and and so forth. I have 6-7 different fields, so that's 6-7 triggers for each variable. This is very tedious.

I wish there were a trigger like the one that adjusts a variable whenever the slider moves, but for non-slider interactions.

This discussion is closed. You can start a new discussion or contact Articulate Support.