Tip 2: Filtering (Advanced/Shared actions)

Intro

This second tip is closely related to the first tip about labeling. If you have read that post you'll have seen that good labeling could facilitate filtering for dropdown lists, using this screenshot. It shows the Parameters dialog box (Shared Actions) where filtering is used to limit the choices in a dropdown list.

Time to explain what I mean by the term 'Filtering'. Dropdown lists are all over Captivate's UI, not only in the Advanced/Shared actions domain. Some of those lists are sorted alphabetically, some are sorted chronologically (very annoying: most recent added item appears on top). They may show all items, but can have an automatic filter of items. That is the case within the Advanced Actions dialog box: when setting up a condition or a While loop, if you need to choose a variable, you'll only see variables in the dropdown list, for operators you only  operators. However, even when filtered and sorted alphabetically the lists can be very long and it takes time to find the proper item. Being able to reduce a list by manual filtering based on the names is a big timesaver! I remember older versions where searching was reduced to typing the first character, to scroll to the items starting with that character. That used to be the case for the variable dropdown list, reason why I started labeling user variables with v_ as first character, to differentiate from the system variables which started either with 'rd' or 'cp' (the first types disappeared from the lists).

Filtering workflow

It consists in typing a sequence of characters, resulting in displaying only items which have that sequence in their name. It doesn't matter where that sequence appears: at the start, at the end, in the middle. There is no case sensitivity, which is rather exceptional. Although names cannot start with a number, if you include a number in the name it will be very easy to use the number as part of the filter sequence. This will become easier to understand with some examples:

Show (Hide)

The dropdown list for those commands in advanced actions will show all objects on all slides, leading to a very long dropdown list. Using a filter and proper labels is very useful as you can see comparing these two screenshots of such an action before and after applying a filter. In this case the filter shows all groups, which are labeled as Gr_xxx

Change State

This screenshot (from the Memory game project) simplifies how to find the correct multistate object. In this case there were many multistate objects in the project:

Parameters

Although many dropdown lists are already filtered on the type of item needed, look at this example. You need to know that in the field here you need to click twice to be able to type in a filter: first click selects the field,  second click gets it in Edit mode (like with a text container). I added the Properties panel, because the label of the active button is used as reference for the 'active' button. Same example was shown at the start of this blog.

Availability of Filters

As you have seen the filters are available for all dropdown lists in:

  • Advanced Actions dialog box
  • Parameter dialog box

Too bad that it is not available for other dropdown lists:

  • Simple action (tab Actions)
  • Object actions (Drag&Drop)
  • Advanced actions list in the Advanced Actions dialog box (which would be very useful if you need to clean up)

Next tip?

It will compare the use of  Grouping (when using Show/Hide workflows) and multistate objects for similar goals.


Tip 1: Labeling (Advanced/Shared actions)

Intro

Many Captivate developers use advanced actions, which is an easy way to extend the functionality of the application without need for learning the rules of a programming language. After publishing the project, those actions are converted to JavaScript. This is also the case for the more flexible (underestimated) shared actions.

However the  ‘point-and-click’ approach for scripts has rules and limitations.  If you start using advanced/shared actions,  understanding those rules will avoid frustrating situations.  This first Tip is all about the importance of customizing labels, the reasons for establishing a labeling discipline (especially when working with a team). Last week two questions in the Adobe forums about issues with advanced actions were due to lack of knowledge about correct labeling.

The terminology used in this blog is the same as in the Adobe documentation. You can check the in-depth exploration of the Advanced Actions dialog box in one of my previous blogs meant also for starters with actions: 

Advanced Actions Outfit since CP2017 – eLearning (adobe.com.

This article will first explain Generic names (labels) attributed by Captivate, continue with Custom labeling. At the end you'll see also an explanation of 'Smart labeling', term used by Adobe when copy/paste is used on items with a custom name.

Generic names (labeling) - Uniqueness

Almost all items in Captivate get a generic name when they are created in a course: objects, placeholders, groups, slides, states, decisions (in actions)... There are a few exceptions:

  • User variables: you need to define a custom name except for the variable associated with a Text Entry Box.
  • Advanced/Shared actions: they also need a custom name 

The first global ruleis fully respected in those generic names. 

 'Each name needs to be unique'
Names are case sensitive, so it is easy to use similar names, by changing one or more characters to uppercase from lowercase. Uniqueness applies also to items from different type: do not use the name for a button, which has already been used for a variable (common mistake), or the name of an action for an advanced action (another common mistake). There are some minor exceptions:

  • Generic name for a Text Entry Box and its associated variable are the same. I don't really like this, and tend to create a new user variable with a custom name, using the X button next to the generic variable name:
    It is not wrong to keep the generic name, but it bumps on the general rule.

  • If you define the name of a button, and use the same name for the action to be triggered by the Success event, it will not be flagged as an error. But if you do the reverse (first action, later the button) you do get an error. I would avoid doing this. 

  • States can have the same name for multiple multistate objects, because as identifier the combination of the object name and the object will be unique if the object has a unique name.

  • Similar for decisions within an advanced/shared action. Although years ago I had issues with an advanced action using the same name as a decision in another advanced action. But decisions can have same name in multiple advanced actions.

When using Generic names, and duplicating the item, the duplicate will have a similar name but ending on another number. Check this screenshot, showing the timeline of a slide with multiple objects and of a duplicate slide:

Custom names (labeling)

Why and when is replacing generic names worthwhile, because it takes time?

  • It will be easier to understand, especially for your clients and collaborators. Referring to the screenshots of the Timeline posted above, if you replace the name of the TEB which will ask for a name by 'TEB_name', and the button is named 'Bt_Next' reading the timeline is more comfortable. Have a look at this Timeline, which is from the Stopwatch tutorial to understand better.
  • When using the items in advanced or shared actions, where you often will need to choose from dropdown lists, it is almost impossible to identify the right item for your choice when working in a project with tons of items.
  • To take advantage of the filtering (see Tip 2) provided by Captivate, custom names can save you lot of time. Look at this screenshot from the Memory Game tutorial where a parameter needs to be chosen for the shared action. There are lot of shape buttons in this game. By typing out one or two characters (here _2) the long list is filtered to facilitate the choice.

Setting up a custom labeling 'system' is also a timesaver, not only when you are collaborating with a team. The global rule of Uniqueness will have to be respected. Names cannot start with a number, nor have strange characters. Try to keep to short names, avoid spaces and remember that names are case sensitive! Here is a short summary of my personal labeling system, however this is just an example. Over a decade ago I started labeling for user variables. At that moment the only way to find a variable in the dropdown lists was by using the first character, because they were sorted alphabetically. To have the group of user variables separated from the system variables (which started with r or c at that moment) user variables started with v_. The first character indicating the type of item, followed by an underscore (replacing a space). This meant the item was also identified by that first character, and I continued to follow the same logic for other items. Some examples:

  • Bt_: first characters of buttons of the three old types (text, transparent, image)
  • SS_: smart shape
  • SB_: shape used as button
  • Im_: bitmap image
  • Ib_: bitmap image used as button
  • SV_: SVG image
  • SVB_: SVG used as button
  • Gr_: group both for object groups and slide groups (Table of Contents)
  • Tx_: text caption
  • CB_: click box
  • ...

For advanced actions I don't have a fixed system. One exception: if an action is meant to be used On Enter for a slide, I will start its name with Enter. I am a frequent user of shared actions whenever possible, which avoids the need for names for multiple duplicate advanced actions,  since you need only one name for a shared action that can be applied multiple times with different parameters. 

For the other characters in the name I will use camel notation. The system allows you to have the second part identical for items which are linked. Example: SVB_Reset can be linked with an advanced action ResetAct, and a variable v_reset.

Maybe I'll add an extra extension to multistate objects in the future, because they are not easily identifiable.

Tip: for much used variables create a shared action as explained in Rare tips (tip 1). By importing that action in a new project you avoid lot of typing.

Smart labeling

When you copy/paste an item with a custom name, the custom name will be preserved, but an extra number is added to the name. This is indicated as 'smart labeling', was introduced some versions ago. 

Example: Duplication of the Next shape button (from the Timeline screenshot for the Stopwatch slide), will lead to this:

The duplicate gets the original name followed by an underscore and a number. In this case the duplicate of SB_Next, became SB_Next_20. It means that the numbers 1-19 had already been used. Same would happen if you copy that button to another project, but the number will be different. If I copy this button to a almost empty new project, the name becomes SB_Next_2, because only one object already existed ending on 1. Keeping at least part of the custom name can be very useful. However it can also become a problem as I learned when importing Shared actions using the same variables. If you don't import (or drag) those actions in one workflow, but in steps, you will end up with duplicate variable bearing another name. You also need to be careful when copying interactive objects which are triggering actions using variables.

Conclusion

I hope this article convinced you of the importance of consistent labeling. Be sure I do not label every item, but I will when they will be needed in an advanced or a shared action. For slides the names do not need to be unique, because internally they are identified by cpInfoCurrentSlide which is a number. However slide names are important if you want to use a Table of Content.

Next tip about Filtering is closely linked to this first tip, and will save you time when developing advanced and shared actions. You will get an overview of the locations where filtering is possible, and those where - saddening - it is not available.

Some Reasons for Labeling in Adobe Captivate

Before plunging into this subject, I want to thank those who commented, tweeted, e-mailed as a reaction to my previous blog post 'To blog or not to blog?' A lot of those reactions really touched me, and they provided me with the energy needed to get on with the blog. Please, feel free to suggest new subjects or react to the postings, I would appreciate it a lot.

 

If  you have been reading one or more of my articles, you already know  that I'm addicted to labeling all kind of objects in Captivate. This is partly but not only due to my playing a lot with Advanced actions. I will try to explain the reasons for spending "precious" developing time to label master slides, slides, objects, effects, audio etc. Although the screenshot in this posting are from Captivate 5, a lot of the reasons mentioned are also valid for earlier versions of Captivate. Where necessary I will indicate that it is only valid for version 5.

Screenshots are in a Gallery at the end of this post.

 

1. Why do I label slides?

First of all, it is so much easier to find a particular slide in the Filmstrip and in the Branching view.
For complex projects I use the Branching view a lot and  as you can see on this first screenshot if feels more comfortable to judge the different workflows in the project when meaningful labels are visible. If I'm working with slide groups I may just label the slides within a group with the group name followed by a number, especially if the slides are the result of capturing some software process.

Tip for CP5 users:  do you know that it is possible to label slides in this Branching view using the HUD (Heads Up Display)? In this HUD you can also define the action 'Jump to'. Do not forget to confirm either labeling and/or jump action with the positive tick.

Since I'm often using a Table of Contents in my projects, the navigation for the user will be facilitated by labeling the slides as you can see in this second screenshot. 

For navigation in a non-linear project assigning the action 'Jump to slide X' is often necessary, and it is so much easier to jump to a labeled slide than having to search for the right number of a slide one wants to jump to. This is even more the case when inserting this kind of action in the Advanced Actions dialog box.

And, more specific for reporting reasons, the Advanced Interaction view will show the slide labels as well.
  

2. Why do I label objects?

Let us start with Non-interactive objects (that cannot be scored by default): Text Caption, Rollover Caption, Rollover Image,  Highlight Box, Zoom object, Image, Drawing objects. Labeling those objects is interesting in all CP-versions if those objects are used in actions like Hiding/Showing and certainly if those actions are in Advanced actions (CP4 and CP5 only).

Only for CP5 users: did you see that object labels are visible on the timeline? This should be stimulating to label them, at least when you have a lot of objects on a slide. Try to select one out of all those Click boxes (see screenshot) if they are indicated by their default names Click_Box_x!  Only Text Captions  are by default easily recognizable on the Timeline because the text (or part of it) is visible.

Same reasons are valid for Interactive objects (that can be scored by default).

Only for CP5 users: extra advantage is objects labels will be visible in the Advanced Interaction view!


3. How do I label Advanced actions and variables?

Here you have no choice: each advanced action and each variable has to be labeled. Some tips? I will always start a variable name with v_ to make it clear that this is not a simple object. In dropdown lists where system and user variables are mixed up, all user variables will then be grouped together.
Advanced actions have to be triggered by an even like Entering a slide, clicking on a button or a click box. Since Advanced actions will have to be assigned to the 'trigger' for the action, I will often put an indication to the trigger in the action label. This is very useful when you need similar actions to be triggered by similar events (where you will use duplicate functionality and editing). I believe this will better be explained by a couple of examples:

  • If the action is to be triggered when entering a slide labeled 'Menu', this advanced action I'll label 'EnterMenu'
  • If the action is to be triggered as a success action for a Click Box and there are different Click Boxes with similar actions, I will choose a similar name for the Click Boxes (such as Yes1, Yes2,...) and the corresponding actions are labeled CB_Yes1, CB_Yes2,... Attributing the correct action to the corresponding Click Box is then a lot easier.

 

If you are not yet persuaded that labeling has a lot of advantages, I give up ;-) But you have to know that for most project I will also label master slides, decisions in advanced conditional actions, voice over clips, customized effects and object styles.

Here is the image gallery: Branching view, TOC, Timeline and Advanced Interactions view.