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

Assign a Variable Value in a Share Action

Explorer ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

This one is aimed a Lilybiri...you've sold me on Shared Actions, but, I ran into a problem.

I setup a shared action to change the state of a couple of objects when learners select different buttons on the page.  But, I need a variable to update as well so I can keep track of what button has been selected.  Everything works fine EXCEPT the "Assign" option doesn't come up in the shared action so I can't change the variable value.

 

Is there another command I should use in a shared action or do you have a workaround for this?

 

jay

Views

449

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
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 10, 2020 Mar 10, 2020

It is not a Boolean. This is a tricky situation. I would have preferred Booleans for a shared action, one Boolean for each button is much safer. In that case you could have defined the variable as parameter. You can try to define the literal as parameter, but that needs a lot of testing, because you have another literal in the action, which is the waiting time. It can perfectly be done (also your next advanced or shared action) with Booleans instead of one variable to track the selection. 

I hav

...

Votes

Translate

Translate
Community Expert ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

Can you show me the advanced action and the parameters dialog box?  You probably didn't indicate the variable as a parameter. Is it a Boolean?

Votes

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
community guidelines
Explorer ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

Here you go.

Shared Action:

sharedAct.JPG

Create From Shared Action:

createFromSharedAction.jpg

The object of this action is that the learner has to choose the correction option amongst four choices.  Selecting a choice displays information about that choice.  There is another button that the learner select to make their choice...which is where the variable value comes in.  This second button executes an advanced action that checks the variable value and then displays the appropriate feedback.

 

Thanks for the help.

Jay

Votes

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
community guidelines
Community Expert ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

It is not a Boolean. This is a tricky situation. I would have preferred Booleans for a shared action, one Boolean for each button is much safer. In that case you could have defined the variable as parameter. You can try to define the literal as parameter, but that needs a lot of testing, because you have another literal in the action, which is the waiting time. It can perfectly be done (also your next advanced or shared action) with Booleans instead of one variable to track the selection. 

I have some posts explaining the difference between a 'compulsory' parameter and a 'candidate' parameter. Both variables and literals are 'candidate'.

Votes

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
community guidelines
Explorer ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

Thanks for the feedback Lilybiri.  I'll try and find your articles and see if they spark anything.  If I figure out an answer I'll let you know.

Jay

Votes

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
community guidelines
Community Expert ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

LATEST

This one is old, but explains difference between compulsory and candidate parameters:

http://blog.lilybiri.com/parameters-in-shared-actions-captivate-7-vs-8

 

Votes

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
community guidelines
Resources
Help resources