Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is very useful to use templates with repeat controls. Imagine a long list of medications that appear on the form in a collapsed state. It is helpful if the section labels are not simply a static text such as "Medication" but rather dynamic and indicative of the values entered into the form.

Templatized Selection Controls

When a template refers to a selection control such as a dropdown, radio or checkbox, the selected option label will show in the form/workflow run-time UI (i.e. in a message control, or the label of another control.) However, for any use of the template in form/workflow settings, such as a Form Action, Pending Message, or Doc Action Email, the template will display the option value. In this example we have a dropdown control named "dd" with options a=apples, b=bananas, c=carrots. Another control's label has the template {dd} and the message control also uses the template {dd}.

Image Removed

At run time, the template displays the selected option label in the UI. Notice that the user sees "apples" in both the text control's label and in the message. If Save Value is checked on the message, the value passed will be "You selected apples", retaining the dropdown template's label in the message control's value.

Image Removed

We've also used the template {dd} to name the PDF, display a Form Action Message, and in the Email subject line.

Image Removed

Each of these uses will return the selection option value for the template. Notice instead of "apples" the template displays "a".

Form Action:

Image Removed

PDF Name:

Image Removed

Email Subject:

Image Removed

Tip

If you need to use the selected option's label in such cases, consider using a business rule like this example to find the label and set it in a hidden control. Then use the hidden control's template in the form/workflow settings.

Complex Templates for Workflow Routing and Escalations

Excerpt

When you are setting up step Assignments or Escalations for workflows, you can assign a user/role template where only part of the text is inside the curly brackets - {}. This is best explained with a simple example using roles for workflow routing.

Let's say the roles in your organization are floor-manager, sales-manager and store-manager. Of course, these role names and users assigned these roles must exist in your tenant. Your form has a dropdown control named roles with these options: floor, sales, store. Users select the first part of the role from the dropdown. The suffix -manager is typed in after the role template in the Assignment tab to create the complex template - (floor-manager, sales-manager, store-manager). The workflow step with the complex template assigned will navigate to the appropriate role.

A partial match template lookup is available on the Assignment and Escalations tabs to select the complex template from dropdown options.

We will assign the {role}-manager on the Assignment tab of a workflow as an example:

  1. Type the control name of the template surrounded by curly brackets - in our example - {role}

     
  2. Type the dash - followed by manager. The {role}-manager appears in the dropdown

  3. Click on it to select. Click Finish to save the changes to the Assignment tab then click the save and exit to save the changes to the workflow.

  4. Test the workflow. Select floor in the role dropdown. The assigned workflow step will navigate to all the users in your tenant with the role of floor-manager.

The partial lookup works with users/roles and prefixes/suffixes in the users/role names.


Templatized Selection Controls

When a template refers to a selection control such as a dropdown, radio or checkbox, the selected option label will show in the form/workflow's run-time UI. So, a selection control template used in a message control or the label of another control will display the selected option label. However, when the template is used in form/workflow settings, such as a Form Action, Pending Message, or Doc Action Email, the template will display the option value. In this example we have a dropdown control named "dd" with options a=apples, b=bananas, c=carrots. Another control's label has the template {dd} and the message control also uses the template {dd}.

Image Added

At run time, the template displays the selected option label in the UI. Notice that the user sees "apples" in both the text control's label and in the message. If Save Value is checked on the message, the value passed will be "You selected apples", retaining the dropdown template's label in the message control's value.

Image Added

We've also used the template {dd} to name the Form Settings to display a Form Action Message, set the PDF Name, and in the Email subject line.

Image Added

Each of these uses will return the selection option value for the template. Notice instead of "apples" the template displays "a".

Form Action:

Image Added

PDF Name:

Image Added

Email Subject:

Image Added

Tip

If you need to use the selected option's label in such cases, consider using a business rule like this example to get the option label and set it in a hidden control. Then use the hidden control's template in the form/workflow settings.

Template Syntax for the Comment Field of Selection Controls

...