December 4, 2010
Few Tips on ‘Advanced Actions’
Comments
(5)
December 4, 2010
Few Tips on ‘Advanced Actions’
(5)

We know that ‘Advanced Actions’ help you develop dynamic content rapidly. I would like to add few tips on Advanced Actions in this tutorial. Probably most of you would already have found these workarounds/hacks. Let me take you through the topics that are covered in this tutorial.

  • How to compare a variable with an empty string?
  • How to mix ‘Standard Actions’ and ‘Conditional Actions’?

How to compare a variable with an empty string?

Say in your course, on the first page you have a password to authorize. So you would be adding a textbox and attach an advanced action to check whether the password is valid. Now if we have to compare the password with empty string and prompt user saying, ‘Empty password’. How do we do this?

Usually what we tend to do is to create a condition action, something like this

But this does NOT work!!! !

Well, to make it work, you need to add a variable called empty_string (name can be anything. Just giving an example) without providing any value to it.

Now change your advanced action a little bit.

That is it. It will start working.

How to mix Standard Actions and Conditional Actions?

In CP5, by now you would have realized that advanced actions are separated into two categories called ‘Standard Actions’ and ‘Conditional Actions’. But at times we might want to mix these two categories.

If you want to compose an advanced action something like below

Box1 indicates a ‘decision’, Box2 indicates ‘Standard Action’ and Box3 indicate again a ‘decision’. We do not have such category of advanced actions. So all we need is to turn the Box2 into a decision by adding a dummy condition that evaluates to true.

Example:  ‘1 == 1’, ‘var1 == var1’…etc (Any condition that evaluates to true).

Now all the Boxes are decisions and hence we can have a conditional action to achieve this.

5 Comments
2021-12-08 06:48:15
2021-12-08 06:48:15

loved learning about this!

Like
()
2021-12-08 06:47:15
2021-12-08 06:47:15

love this set up!

Like
()
2010-12-03 21:46:06
2010-12-03 21:46:06

Thanks for this posting. Users that want to create advanced actions should know indeed that a string is not included in quotes ” ” like in other scripting languages, which lead to the first tip but is also important when creating a condition where a string is used, never use quotes.
Some weeks ago I published an article about the combination of a standard with a conditional action in Captivate 5 with an example usecase. Perhaps this could be a supplement to this blog post:
http://kb2.adobe.com/community/publishing/862/cpsid_86254.html

Like
()
(1)
>
Anonymous
's comment
2010-12-06 10:15:15
2010-12-06 10:15:15
>
Anonymous
's comment

Thanks a lot for the article that you had posted. A pretty nice scenario to explain the use case of combining standard and conditional actions.

Like
()
2010-12-03 21:35:12
2010-12-03 21:35:12

[…] This post was mentioned on Twitter by Rick Zanotti, Mark Fletcher, Jim Leichliter, David Jumeau, AJ George and others. AJ George said: #AdobeCaptivate: Few Tips on Advanced Actions http://bit.ly/f8CeB2 #eLearning […]

Like
()
Add Comment