Highlighted

Advanced Actions: Conditional evaluating incorrectly?

New Here ,
Sep 18, 2019

Copy link to clipboard

Copied

I am working on a scenario that can result in viewing the same slide from different branches. The navigation part of the scenario (and the actions) works well. The only part that isn't working is colouring visited buttons. Here is a sketch of what happens:

 

.1 User visits Source #1 (BackWork) and clicks a button (Scn3_button_AddictionSpirals).

.2 User visits the common slide (AddictionSpirals) which has a few buttons that lead to end points. On entry to that slide, conditionals check:

.a If a viewed variable (Scn3_variable_HidesIt_viewed) is equal to 1, the relevant button is set to a "visited" colour. There is a conditional for each button on this slide and the viewed variables are set correctly, and they are being correctly detected, and the buttons are correctly coloured.

.b If all the buttons have been viewed and the last slide (Scn3_variable_AddictionSpirals_lastslide) is the right source (in this example it's Slide 31), the variable for the button on AddictionSpirals (Scn3_variable_AddictionSpirals_viewed) is set to 1. There is a copy of this conditional for each possible source button.

.3 After the user views all the content on AddictionSpirals (visits all the buttons), if they return to the source (BackWork), the original button (Scn3_button_AddictionSpirals) is coloured correctly (as all the content below it in the tree has been viewed). So, the first time through, all works correctly. The trick is if the user continues to another source.

.4 User visits another source (YoureFine), enters the common slide (AddictionSpirals), and sees that all of the content below this point has already been viewed. When they enter this slide, a conditional should fire that says:

Have all buttons been viewed AND the last slide is YoureFine? Then set viewed variable (Scn3_variable_YoureFine_viewed) to 1.

.5 When the user returns to the source (YoureFine), the button (Scn3_button_YoureFine) does not colour correctly. This only happens the SECOND time the user visits the common slide (AdditionSpirals), AND if they view AddictionSpirals again and return to the source, Scn3_button_YoureFine colours correctly.

 

Debugging: I have the variables outputting on AddictionSpirals, and they all have the correct values, so the problem lies with the conditional not evaluating correctly. At least, that's what it seems to be.

 

Gotchas (things that might be wrong that I've already tried):

.1 Variable names are correct (that seems to be a common problem)

.2 I'm not experiencing the script saving problem that some people are having

.3 I am aware that the slide count starts at 0, and I account for that.

.4 I am keeping "last slide" as its own variable (instead of using the system variable) because I am tracking which slide was the source (the slide you came from to visit AddictionSpirals) and that is slightly different from what the system variable provides. This functionality works because the "back" button also uses it and it works correctly every time.

.5 It's possible that it's a logic issue as the logic is complex. However, I wanted to ask the community first, before going into that much detail, just in case it's something silly and easy.

.6 As I write this, I realize that AddictionSpirals is sort of a confusing name because it refers to the common slide AND one of the buttons that links to the common slide (Scn3_button_AddictionSpirals). However, changing it at this stage might introduce yet another bug that's difficult to track.

 

Any advice for what could be wrong or how to debug would be great. Thanks!

If there is a better way to describe all this, please let me know. Screenshots would help, but there would be A LOT of them. Let's try this and see how it goes.

 

As requested:

AdvancedActionsBug-CommonSlide-ActionPreview.png

AdvancedActionsBug-CommonSlide-AdvancedInteraction.png

Topics

Advanced actions

Views

57

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Advanced Actions: Conditional evaluating incorrectly?

New Here ,
Sep 18, 2019

Copy link to clipboard

Copied

I am working on a scenario that can result in viewing the same slide from different branches. The navigation part of the scenario (and the actions) works well. The only part that isn't working is colouring visited buttons. Here is a sketch of what happens:

 

.1 User visits Source #1 (BackWork) and clicks a button (Scn3_button_AddictionSpirals).

.2 User visits the common slide (AddictionSpirals) which has a few buttons that lead to end points. On entry to that slide, conditionals check:

.a If a viewed variable (Scn3_variable_HidesIt_viewed) is equal to 1, the relevant button is set to a "visited" colour. There is a conditional for each button on this slide and the viewed variables are set correctly, and they are being correctly detected, and the buttons are correctly coloured.

.b If all the buttons have been viewed and the last slide (Scn3_variable_AddictionSpirals_lastslide) is the right source (in this example it's Slide 31), the variable for the button on AddictionSpirals (Scn3_variable_AddictionSpirals_viewed) is set to 1. There is a copy of this conditional for each possible source button.

.3 After the user views all the content on AddictionSpirals (visits all the buttons), if they return to the source (BackWork), the original button (Scn3_button_AddictionSpirals) is coloured correctly (as all the content below it in the tree has been viewed). So, the first time through, all works correctly. The trick is if the user continues to another source.

.4 User visits another source (YoureFine), enters the common slide (AddictionSpirals), and sees that all of the content below this point has already been viewed. When they enter this slide, a conditional should fire that says:

Have all buttons been viewed AND the last slide is YoureFine? Then set viewed variable (Scn3_variable_YoureFine_viewed) to 1.

.5 When the user returns to the source (YoureFine), the button (Scn3_button_YoureFine) does not colour correctly. This only happens the SECOND time the user visits the common slide (AdditionSpirals), AND if they view AddictionSpirals again and return to the source, Scn3_button_YoureFine colours correctly.

 

Debugging: I have the variables outputting on AddictionSpirals, and they all have the correct values, so the problem lies with the conditional not evaluating correctly. At least, that's what it seems to be.

 

Gotchas (things that might be wrong that I've already tried):

.1 Variable names are correct (that seems to be a common problem)

.2 I'm not experiencing the script saving problem that some people are having

.3 I am aware that the slide count starts at 0, and I account for that.

.4 I am keeping "last slide" as its own variable (instead of using the system variable) because I am tracking which slide was the source (the slide you came from to visit AddictionSpirals) and that is slightly different from what the system variable provides. This functionality works because the "back" button also uses it and it works correctly every time.

.5 It's possible that it's a logic issue as the logic is complex. However, I wanted to ask the community first, before going into that much detail, just in case it's something silly and easy.

.6 As I write this, I realize that AddictionSpirals is sort of a confusing name because it refers to the common slide AND one of the buttons that links to the common slide (Scn3_button_AddictionSpirals). However, changing it at this stage might introduce yet another bug that's difficult to track.

 

Any advice for what could be wrong or how to debug would be great. Thanks!

If there is a better way to describe all this, please let me know. Screenshots would help, but there would be A LOT of them. Let's try this and see how it goes.

 

As requested:

AdvancedActionsBug-CommonSlide-ActionPreview.png

AdvancedActionsBug-CommonSlide-AdvancedInteraction.png

Topics

Advanced actions

Views

58

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Sep 18, 2019

Copy link to clipboard

Copied

Too complicated to understand only textual explanation.

 

Please post a Preview of the advanced action! And of the Advanced Interaction panel. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Sep 18, 2019

Copy link to clipboard

Copied

Images added as requested

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Captivate User Guide
New Group