Calculate in figures Storyline

Jun 26, 2012

Hello,

Is it possible to add the figures enetred by the users in say 5 rows and have the result appear in a 6th row?

22 Replies
Jeanette Brooks

Hi Neha! Here's one example of how you could tackle that:

Published Example | Storyline source file

Here are the general steps I followed to build it:

  • Insert the numeric data entry fields on the slide's base layer.
  • Create a numeric variable to keep track of the sum.
  • Add a slide layer where you'll display the sum, and set the layer properties so that the layer resets to its initial state every time it's revisited.
  • On the Sum Layer, create a trigger that sets the value of the Sum to zero, then additional triggers to add the value of each numeric entry field to the Sum.
  • On the base layer, for each data entry field, create a trigger to hide the Sum Layer and then show the Sum Layer. This basically allows the Sum Layer to refresh itself each time the learner enters something different in any of the numeric fields. That way, if the learner goes back and changes any of the values, the sum recalculates rather than continuing to add the edited value(s) to the total.
Neha Jain

Hello Jeanette,

Thanks for the solution. That is what I was looking for. I am working with multiple rows and columns. I tried adding the sum fields (one field for each column) in the same layer, it does not work. I tried creating it in different layers but then only one layer (sum field) is displayed at one time. Could you please suggest what could be the problem or a workaround?

Rebecca Fleisch Cordeiro

Hi,

Neha and Jeanette, thanks to you both. As I've said before, the questions get me to thinking about how to do this on my own, and then when I get stuck, the answers get me unstuck. Often, though, that leads to more questions. I'm not sure if this is one question or two or maybe even more.

FYI I did all of this on a template: Character Display Panels >Projection Screen

Tab Key

How would I set this up so the tab key would move the learner from value number box to value number box. Basically I'm asking how I can take control of the sequence of tab key presses.

Current behavior: The slide appears.

I press tab and the word  "Menu" is highlighted

Press tab and the menu pane is highlighted

Press tab and the speaker icon is highlighted

Press tab and the prev button is highlighted

press tab and the next button is highlighted

press tab and the word "resources" is highlighted

press tab and...it starts all over again...so I never do get the Learner over to the number entry box. Of course I know how to remove all these items, but that's NOT what I want to do.

If instead I click in the first number entry box and enter a number

  1. press tab, the number is calculated
  2. Press tab again the next entry number is highlighted so I can enter the amount
  3. Press tab the # is calculated
  4. Press tab the "enter another number" text box is highlighted in yellow
  5. Press tab, and enter the amount
  6. Press tab, the number is calculated

I don't know why that text box is highlighted. And in any case, what if I wanted the user to get right down to business with the tab key. And, what if it's unnecessary in this scenario for all those other objects to be highlighted?

So, again, how do I take control of tab key presses?

Steve Flowers

Hi, Rebecca - 

Tab order runs top to bottom. Your top most text entry box should be focused by default. To make your text boxes and other objects not highlight on tab, right click the object > Size and Position > Uncheck Object is visible to accessibility tools. You can leave this box open as you select other objects on the stage to uncheck for the unwanted tab thieves.

Rebecca Fleisch Cordeiro

Hi Steve and tx for your quick reply.

So, I looked at your instructions regarding the unchecking for accessibility tools, and I was able to remove the highlight from the text box I'd described above. Tx for that tip...big help for now and future projects.

I also have looked at your tab order example, and don't understand 'sup with mine. I do have a variable set for the entry to be focused by default, but obviously something is wrong, because the Learner must click on it in order for it to focus.

If I move my numeric entry boxes to the bottom of the outline (which is what it looks to me you've done with your text entry boxes), they're hidden behind other objects. FYI, I copied Jeanette's format, where she created a text box beside each numeric entry box. The text box simply tells the user what to do;they enter their numbers in the numeric entry field.

The instructions Jeanette provided have us using 2 layers, so I don't know if that complicates the situation.

Posting here for anyone who wants to take a look.

Rebecca Fleisch Cordeiro

Hi Emma,

Not entirely sure if this is what you want, but the attached adds the second numeric entry to the first numeric entry and divides the total by the third numeric entry.

Learners enter the numbers in the numeric entry boxes.

They click the calculate button, where triggers are set up to:

Adjust the RESULT variable = to NUMERICENTRY1 variable

then

Adjust RESULTS variable by Adding NUMERICENTRY2 variable to it

then

ADJUST RESULT variable by Dividing it by NUMERICENTRY3 variable

Is that what you were looking to do?

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