Building Applications in the LiveCycle Lane

Posts tagged "Action Builder"

While we’re looking at LiveCycle Designer, here’s another great new tool that will help you avoid writing potentially long and tedious script. It’s called Action Builder and it’s pretty powerful. You can use it to define actions that will add or remove fields or sections of your form, set field values, change field or background colours, hide or show objects, or set focus to a specific field. All without writing any script by your yourself.

In this example, we want to either show or hide a bunch of credit card fields depending on the Payment option that was selected.

Assuming you have a form with these fields already on them, you would follow these steps (a link to the sample form is below):

Select Tools > Action Builder…

Click the “Add a new action” icon

Set the condition by selecting an object and a corresponding event. You can create multiple conditions with AND/OR operators. But for this example we’ll set only one condition for each action. For the first action, we want a result to be triggered when “Credit Card” has been selected by the end user.

Set one or more results. In this action we want a bunch of fields to become visible.

Create a second action. This time the condition will monitor for when the Credit Card option is NOT selected. When the condition is met, it will trigger several results that will make the fields invisible

Action Builder creates what is called “managed script”. You can see this script in the Change event of the Payment field. You can, of course, edit this script – but it’s not recommended. And if Designer detects any modifications it will assume that you’re taking control and the script will become unmanaged.