Advancing to next slide on condition

Mar 22, 2013

Hello, I am new to Storyline.  I have a self-graded assessment for a slide I am creating.  What percentage do you manager, and what percentage do you sell real estate?  I do not want the user to advance to the next slide until they put amounts in both boxes that total 100%.  I would also like to show a pop-up box to inform them of the requirement if they try to add any numbers to the two choices that do not add up to 100%.  Thanks in advance for your help.

13 Replies
Rebecca Fleisch Cordeiro

Hi John,

I've attached a story that I believe achieves what you want. Learners must either click outside the numeric entry boxes after typing in the numbers or press the TAB key to move "off" these boxes.

There are 3 number variables: managing, selling, and total. The  two slide triggers that I created, in this order, top to bottom:

Set  Total equal to numericentrymanaging when numericentrymanaging changes

Add numericentryselling to Total when numericentryselling changes

The two object triggers are inserted automatically when the numeric entry boxes are inserted from Insert >Data Entry :Numeric entry

Finally, I modified the trigger on the next button to jump to the next slide when Total is equal to 100.

I think that does it. Question/comments, give a holler.

Rebecca Fleisch Cordeiro

Hi John,

Here's an updated version of the file, per our discussion. I've added a Try again Layer, which is triggered from the base layer if the Total doesn't equal 100.

The try again layer has an OK button.

This button has 3 triggers:

  • Set the "managing" variable to 0 when the Learner clicks
  • Set the "selling" variable to 0 when the Learner clicks
  • Close the Try Again layer when the Learner clicks.

This way if the Learner enters an incorrect amount, they can click OK from the Try Again layer and, umm... Try Again!

Simon Blair
  • I don't think that solution quite works, though. Consider this use-case:
  • I put 50 in the first box
  • When I get to the second box I reconsider my answer and put in 60
  • I go back to the first box and put in 40

The end result is that the two boxes add up to 100, but the total stored in the variable is at 150.

I can think of two possible ways to address that:

  • Wait until the user clicks the next button to sum up the two fields (probably the more elegant way)
  • Reset the total to zero each time the user leaves a field, something like this:
  1. Set the total to zero
  2. Add the value from the left to the total
  3. Add the value from the right to the total

The first option seems like it'd be easier to implement, although the second has the advantage of showing the current total (handy for people who aren't as strong in math, or if you need to apply this logic when there are many fields to sum up).

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