Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need a sanity check for an advanced action

Community Beginner ,
May 13, 2016 May 13, 2016

Hi everybody,

I've been working on what I thought was a simple advanced action to essentially hide a slide and disallow access until an interaction is successfully completed. For some reason I can't get it to work and I can't find the error in my logic. I'm hoping fresh eyes/brains will catch what I can't!

Slide A is part 1 of a 2-part interaction. Upon visiting slide A, a variable (VAR) is assigned '0'. At the end of the advanced action to verify the correct answer, VAR is assigned '1' when the answer is correct.

Slide B is part 2 of the interaction. I want this slide to only be accessible after part 1 is successfully completed. After the slide has loaded there's an action to assign a second variable, var_slide_status with 'visited'.

Slide C comes after B and is just a regular slide, not part of the interaction. On slide entry, VAR is assigned '2'.

Slide B has a validation advanced action that manages different navigation scenarios, it goes something like this (using multiple decision blocks):

  • if var=0, jump to Slide C (skips Slide B since Slide A wasn't answered correctly)
  • if var=1, continue and assign var_slide_status with 'visited' (Slide A answered correctly, Slide B continues and assigns a variable saying it has been visited)
  • if var=2 AND var_slide_status != 'visited', jump to Slide A (allows for backward navigation while skipping Slide B)
  • if var=2 AND var_slide_status='visited', continue (allows backward navigation to Slide B so user doesn't have to re-do Part 1)
  • if var=0 AND var_slide_status='visited', continue (allows re-navigation forward since VAR will revert back to 0 when Slide A is re-visited)

Right now, the navigation isn't working as expected. The back and forward skipping Slide B works fine if Slide A is not answered correctly or isn't attempted. Slide B also shows up fine when Slide A is answered correctly. The problem lies when Slide B is accessed and I move forward to Slide C. Every time I click back from Slide C, instead of going back to revisit Slide B as I hoped, Slide C reloads itself. If I click twice really fast, it will jump to Slide A, but never Slide B even though it has already previously been visited. Then when it takes me back to Slide A, when I go forward

I hope this makes sense because I had a time figuring out to begin with. It makes sense to me but clearly I'm not doing something right. Can anyone take a look and figure out what I'm doing wrong?

428
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 13, 2016 May 13, 2016

Please, post a screenshot of the advanced actions.

Sent from my iPad

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 13, 2016 May 13, 2016

Yes of course, sorry I didn't think to do that before!

Just to preface, my naming conventions are not ideal as you'll see one variable and the advanced action have the same name, so hopefully that does't confuse.

Here's Slide A on enter, and then the validation of the interaction:

Screen Shot 2016-05-13 at 7.46.03 PM.png Screen Shot 2016-05-13 at 7.48.23 PM.png

Here's Slide B, on enter and the decision blocks within that advanced action:

Screen Shot 2016-05-13 at 7.46.19 PM.pngslideB_1.pngslideB_2.pngslideB_3.pngslideB_4.pngSlideB_5.png

And here's Slide C on enter:

slideC_oneneter.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2016 May 14, 2016

Sorry, you seem to be unaware of the Preview action button that exists for conditional actions, which will show the total work flow of the action with all decisions: look in the top control panel, there is a Play icon (first button), which will open the Preview Action window. I suspect something is awry with the sequence of your decisions/commands but it is difficult to read this from separate screenshots.

Another tip: naming convention not ideal is a serious underestimation. NEVER use the same name twice, please. There are only a few circumstances where Captivate will not go crazy if you use the same name twice. This could be one of the origins of your issues.

You use several decisions On Enter for slide B, but the action that will skip slide B when going backwards should be triggered by the Back button, I don't understand why you are putting that in the On Enter action at all. Maybe post also partially the content of Advanced Interaction view (F9) to see which actions are triggered by which events.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 14, 2016 May 14, 2016

I was totally unaware of both the advanced action preview and the advanced interaction view...so thank you! I'm still new to Captivate and figuring it all out so simple tips like these are very helpful!

As far as having an action occur when the 'Back' button is clicked, how exactly would I do that? I'm using the in-built playbar controls rather than custom buttons for navigation.

Here are some screenshots of the views you mentioned, hopefully this is more clear as to what's going on. Also, I changed the advanced action name so it is unique rather than in conflict with the variable name (I tested and it made no difference as far as the functionality).

Screen Shot 2016-05-14 at 10.37.18 AM.pngScreen Shot 2016-05-14 at 10.40.48 AM.pngScreen Shot 2016-05-14 at 10.40.58 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2016 May 14, 2016

I'm trying to figure out what you exactly want to achieve.

Another tip: do not use the default playbar when you start working with navigation changed by advanced actions, but use custom navigation buttons. At this moment you are limiting the 'events' that can trigger an advanced action to the slide events, with custom navigation you'll have the Success events of the buttons as well. It would then be much easier to skip a slide when navigating back or Forward. Moreover, with most playbars, you'll have the progress bar. The user can always scrub that progress bar to end up on any slide, at any frame. That is clearly not what you want in this case.

Let me try to translate your scenario:

  • Creation of two user variables, will label them v_check and v_visit; v_visit (Boolean) has a default value of 0;  v_check == 0 using the On Enter event of slide 27
  • Button_52: sort of Submit button, its Success event will check fields entries (TEB's) on 27 and if correct v_check == 1;
    That same button navigates the user to slide 28 if answer is correct but...
  • I have no idea what happens when answer is incorrect? Does the user gets another attempt? Will v_check keep its value == 0? Or is the user also navigated to Slide 28 for an incorrect answer?
  • On Enter of Slide 28 for a correct answer, when the user has not visited slide 28 yet, the second decision results in True. Some text containers are hidden and the second variable v_visit == 1 (would be easier than assign a string, but that is up to you). I suppose the user remains on that slide, to do what? He can use the Back and Forward buttons on the default playbar, will navigate to 27 or to 29 in that case. Is that correct?
  • On Enter of Slide 28 for an incorrect answer,  v_check==0 , third decision results in True, slide 28 is skipped, user goes to 29. This will also happen when the user clicks on the Back button on slide 29: he is returned to Slide 29 eternally with that Back button.
  • I do not understand the purpose of the first decision: why do jump to slide 28 when you are on slide 28? Replace the Jump by Continue please. This decision only results in True when the user had a correct answer, and visited both slides 28 and 29. This situation only happens when the user returns with the Back button from slide 29 or later slides. Correct?
  • The last decision: from my experiences with advanced actions, more specific with logical operators (check my blog, you'll see that I spent a lot of time with advanced/shared actions and variables) I am very suspicious of that last combination of two conditions
    • v_check == 2     which is fine  but combined with a negative
    • v_visit != visited    especially with strings I would never use that

My recommendation: as you can read in my long translation history above I would use a number (Boolean) for v_visit as well. When slide 28 is not yet visited, v_visit == 0 (default value, or set On Enter like v_check), when it is visited give it the value 1. The last condition will then become more trustworthy:

    • v_check == 2  AND
    • v_visit == 0

This situation would happen if the user was on slide 29 before ever having entered slide 28, correct? Is that possible?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 14, 2016 May 14, 2016

Unfortunately, I'm stuck with the default playbar for now.

I addressed your points in blue below.

Let me try to translate your scenario:

  • Creation of two user variables, will label them v_check and v_visit; v_visit (Boolean) has a default value of 0;  v_check == 0 using the On Enter event of slide 27
  • Button_52: sort of Submit button, its Success event will check fields entries (TEB's) on 27 and if correct v_check == 1;
    That same button navigates the user to slide 28 if answer is correct but...
  • I have no idea what happens when answer is incorrect? Does the user gets another attempt? Will v_check keep its value == 0? Or is the user also navigated to Slide 28 for an incorrect answer? If the answer is incorrect, a text box displays prompting the user to try again. They can either continue trying or skip ahead if they don't want to complete it. Skipping ahead without successfully answering should take them to Slide 29.
  • On Enter of Slide 28 for a correct answer, when the user has not visited slide 28 yet, the second decision results in True. Some text containers are hidden and the second variable v_visit == 1 (would be easier than assign a string, but that is up to you). I suppose the user remains on that slide, to do what? He can use the Back and Forward buttons on the default playbar, will navigate to 27 or to 29 in that case. Is that correct? This slide has a second question that is based on the answer provided on Slide 27. I set it up this way because at the time I thought having a "hidden" slide would be easier/cleaner than using a bunch of hide/show objects on a single slide. Maybe I should rethink that! Your understanding is correct.
  • On Enter of Slide 28 for an incorrect answer,  v_check==0 , third decision results in True, slide 28 is skipped, user goes to 29. This will also happen when the user clicks on the Back button on slide 29: he is returned to Slide 29 eternally with that Back button. Currently, when a user clicks back on Slide 29 and v_visit != 1, they are skipped backward to slide 27, which is the intended action.
  • I do not understand the purpose of the first decision: why do jump to slide 28 when you are on slide 28? Replace the Jump by Continue please. This decision only results in True when the user had a correct answer, and visited both slides 28 and 29. This situation only happens when the user returns with the Back button from slide 29 or later slides. Correct? Yes, I was playing around trying different actions at the time of the screenshot. It's currently set to Continue, but no change in effect.
  • The last decision: from my experiences with advanced actions, more specific with logical operators (check my blog, you'll see that I spent a lot of time with advanced/shared actions and variables) I am very suspicious of that last combination of two conditions
    • v_check == 2    which is fine  but combined with a negative
    • v_visit != visited    especially with strings I would never use that

My recommendation: as you can read in my long translation history above I would use a number (Boolean) for v_visit as well. When slide 28 is not yet visited, v_visit == 0 (default value, or set On Enter like v_check), when it is visited give it the value 1. The last condition will then become more trustworthy:

    • v_check == 2  AND
    • v_visit == 0

This situation would happen if the user was on slide 29 before ever having entered slide 28, correct? Is that possible? I agree and changed the variable values. Yes, a user would be on 29 before 28 if they did not attempt or answer the question correctly on slide 27.

After making the changes you suggested the action reads much more plainly to me, but for the life of me I still can't figure out why it isn't working. Here's a preview of the action after the changes I made:

Screen Shot 2016-05-14 at 2.56.34 PM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2016 May 14, 2016

What exactly doesn't work correctly now?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 14, 2016 May 14, 2016

The navigation works fine when the question on slide 27 is not attempted--slide 28 is skipped and the user arrives on slide 29. Also moving backwards from slide 29 in this scenario correctly skips over slide 28 and brings the user back to slide 27.

The problem is that when the answer is provided correctly and the user moves on to slide 28. The variable cp_visited should be assigned '1' to allow that slide to be accessed from now on, whether navigating forward from 27 or backward from 29. However, what happens is that after the user is done with slide 28 and moves on naturally to 29, going backward results in slide 29 reloading itself. It appears to attempt to move back to 28 only to be forwarded right back to 29. When I use the TOC to navigate back to 27 and then attempt to move forward using the 'forward' button on the playbar (without re-attempting the question), it skips over 28 even though cp_visited should still be equal to '1' and therefore allow entry to the page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 16, 2016 May 16, 2016
LATEST

Sorry that I didn't answer yet (so busy at this moment). The only way to help you is that I create a similar situation in a test file, to offer you an advanced action that could be functional. I hope to find some time today.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources