Highlighted

Assign a Variable Value in a Share Action

Explorer ,
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

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

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'.

Views

199

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

Assign a Variable Value in a Share Action

Explorer ,
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

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

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'.

Views

200

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 ,
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?

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...
Explorer ,
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

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...
Most Valuable Participant ,
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'.

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...
Explorer ,
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

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...
Lilybiri LATEST
Most Valuable Participant ,
Mar 10, 2020

Copy link to clipboard

Copied

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

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

 

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