Skip to main content
abeardsl23
Inspiring
August 29, 2017
Question

Captivate 9 Advanced Action - Expression

  • August 29, 2017
  • 2 replies
  • 901 views

Hello, all.  

Any chance someone knows whether or not I can have multiple operations in the same expression?

For example, I would like to have this as one expression:

Expression         vTOTAL = v1 + v2 + v3 + v4

However, all I can do is:

Expression        vTOTAL = v1 + v2

That said, I have tried:

Expression       vTOTAL = vTOTAL + v1

Expression       vTOTAL = vTOTAL + v2

Expression       vTOTAL = vTOTAL + v3

Expression       vTOTAL = vTOTAL + v4

With the last example, the numerical progression of my vTOTAL variable is: 0, 1, 3, 6, 12 (and v1 through v4 are all assigned the value of 1)

What am I missing?  I've included my advanced actions below. Thank you!

Expression

This topic has been closed for replies.

2 replies

Lilybiri
Legend
August 29, 2017

Expression is limited to 1 operator and 2 variables or literals, which makes it cumbersome for long calculations.

Do you say that the second work flow doesn't give the correct result?

Alternative is to use JS for calculations. It is not always quicker to do however, but JS has a lot of mathematical functions missing in Captivate.

abeardsl23
Inspiring
August 29, 2017

Ha!!!!  I figured it out!  

briginad20664517
Participant
October 24, 2017

Hello, can you please tell me how you added multiple variables together? Here's what I'm trying to do:

y_total = yellow1 + yellow2 + yellow3 + yellow4 + yellow5

p_total = purple1 + purple2 + purple3 + purple4 + purple5

g_total = green1 + green2 + green3 + green4 + green5

o_total = orange1 + orange2 + orange3 + orange4 + orange5

b_total = blue1 + blue2 + blue3 + blue4 + blue5

Then I want Captivate to determine if any of the _total variables is equal to 0 and perform a designated action. Can I do this with an expression?

Thank you!

Lilybiri
Legend
October 24, 2017

Try like this:

v_total = v_1 + v_2

v_total = v_total + v_3

v_total = v_total + v_3

For the condition: combine with OR to check the value of 'any' variable.

On Oct 24, 2017 7:41 AM, "briginad20664517" <forums_noreply@adobe.com>