Forum Discussion

SO_Instruction's avatar
SO_Instruction
Community Member
16 days ago

Bug adjusting variable with an if statement

Hi, 

Trying to set variables for use in javascript, I ended up finding a bug with setting variables with a condition. Tested in a new project to make sure it wasn't a fluke and problem persists.

Idea was if variable a1 is false then set variable a2 to 0, else set variable a2 to variable a3.

It appears it's not possible with the current version of storyline which only allows both actions on if/else to set a value or a variable but not a combination of both. 

Examples (please pardon the french):

I found three workarounds but I think Storyline shouldn't behave that way.

1: make another trigger, one triggers if variable true, the other one if it's false

2: create a variable that has the value you want in and take the case with both setting variable

3: affect a random number from 0 to 0 in my case in the else part.

 

Should I open a support ticket or would that serve as one?

Thanks, 

Anthony

 

  • Hi, SO_Instruction!

    Thanks for sharing this with us. The community is a great place to post, especially to see if others are encountering a similar issue. I've also opened a support case on your behalf so our Support Engineers can investigate further. They'll be in touch via email!