- Overview
- Callout
- Complex Scenarios
- Credentials
- Data Service
- Form
- Release notes
- Project compatibility
- Real Time Forms
- Updating form data
- Running forms using JavaScript
- Customizing Forms Using CSS
- Conditional components
- Adding multiple components on the same row in Columns
- Using the Data Table component
- Get File/Folder path
- Reading cell values from a Data Grid component
- Displaying PDF files
- Displaying images in forms
- Scrolling through Data Grids
- Using Dev Tools with forms
- Calculate form component values
- Managing dates in forms
- Opening hyperlinks inside forms
- Displaying a default tab in forms
- Displaying the full label of a component
- Searching long strings in drop-down lists
- About the pre 23.4 Form experience
- Project Compatibility
- Real Time Forms
- Dynamic Checkboxes
- Conditional Dropdowns
- Displaying a Default Tab
- Displaying Images
- Displaying PDF Files
- Displaying the Full Label
- Dynamic HTML Elements
- Managing Dates
- Searching Long Strings in Drop-downs
- Customizing Forms Using Local CSS Files
- Executing Do Block On Checkbox Change
- Customizing Columns Width
- Updating Form Data
- Resetting Collection Data
- Advanced Logic
- Executing Do Block on Dropdown Option Change
- Reading Cell Values From a Data Grid Component
- Conditional Components
- Scrolling Through Data Grid Components
- Using the Grid Component
- Dev Tools
- Calculated Value
- Dynamic Dropdowns
- Switching Tabs With Button Click
- Opening Hyperlinks Inside Form
- FTP
- IPC
- Persistence
- Release notes
- Project compatibility
- About the Persistence activity package
- Bulk Form Designer
- Start Job And Get Reference
- Wait for Job and Resume
- Add Queue Item And Get Reference
- Wait For Queue Item And Resume
- Wait for Form Task and Resume
- Resume After Delay
- Assign Tasks
- Create External Task
- Wait For External Task and Resume
- Complete Task
- Forward Task
- Get Form Tasks
- Get Task Data
- Add Task Comment
- Update Task Labels
- Create App Task
- Wait for App Task and Resume
- Working with App tasks
- Building Your First Form Action
- Advanced Controls for Drop-downs
- Embedding Objects in Form Actions
- Allowing Users to Upload Files to the Storage Bucket
- Adding Advanced Logic Using Java Script
- Setting a Default Tab
- Removing the Delete button from Edit Grid using custom CSS
- Customizing Edit Grid templates
- Using buttons to trigger custom logic
- Using an External Form Layout
- Dynamically expanding form components at runtime
- Sample Workflows
- Automation Ops Pipelines
- System
- Release notes
- About the System activity package
- Project compatibility
- RegEx Builder Wizard
- Is Text Matching
- Find Matching Patterns
- Modify Text
- Modify Date
- Replace Matching Patterns
- Text to Left/Right
- Add Data Column
- Add Data Row
- Build Data Table
- Clear Data Table
- Get Row Item
- Update Row Item
- Merge Data Table
- Output Data Table
- Remove Data Column
- Remove Data Row
- For Each Row in Data Table
- Generate Data Table From Text
- Create List
- Append Item to List
- Read List Item
- Update List Item
- Add Log Fields
- Comment Out / Disabled Activities
- Comment
- Change Type
- Log Message
- Remove Log Fields
- Invoke Com Method
- Format Value
- Lookup Data Table
- Filter Data Table
- Sort Data Table
- Remove Duplicate Rows
- Join Data Tables
- Report Status
- Append Line
- Compress/Zip Files
- Copy File
- Copy Folder
- Create Folder
- Create File
- Delete
- File Exists
- Folder Exists
- Extract/Unzip Files
- Wait for Download
- File Change Trigger
- For Each File in Folder
- For Each Folder in Folder
- Delete File
- Delete Folder
- Move File
- Move Folder
- Rename Folder
- Rename File
- Path Exists
- Read Text File
- Write Text File
- Get File Info
- Get Folder Info
- Get Processes
- Get Username/Password
- Kill Process
- Beep
- Get Environment Folder
- Get Environment Variable
- Invoke Power Shell
- Input Dialog
- Message Box
- Browse for File
- Browse for Folder
- Invoke VBScript
- Process End Trigger
- Process Start Trigger
- File Change Trigger V3
- Trigger Scope
- Repeat Number of Times
- Text to Upper/Lowercase
- Set Environment Variable
- For Each
- Break / Exit Loop
- Retry Scope
- Check True
- Check False
- Workflow Placeholder
- Invoke Workflow File
- Launch Workflow Interactive
- Invoke Code
- Continue / Skip Current
- Multiple Assign
- Invoke Process
- Run Parallel Process
- While
- Do While
- Repeat Number Of Times
- Raise Alert
- Orchestrator HTTP Request
- Get Asset
- Get Credential / Get Orchestrator Credential
- Set Asset
- Set Credential
- Get Jobs
- Get Current Job Info
- Start Job
- Stop Job
- Add Queue Item
- Add Transaction Item
- Delete Queue Items
- Get Queue Items
- Get Transaction Item
- Postpone Transaction Item
- Set Transaction Progress
- Set Transaction Status
- Should Stop
- Wait Queue Item
- Bulk Add Queue Items
- Write Storage Text
- Upload Storage File
- List Storage Files
- Read Storage Text
- Download Storage File
- Delete Storage File
- Custom Input
- Append Item to Collection
- Build Collection
- Collection to Data Table
- Exists in Collection
- Filter Collection
- Merge Collections
- Remove From Collection
- Reset Timer
- Resume Timer
- Start Timer
- Stop Timer
- Timeout Scope
- Manual Trigger
- When New Item Added to Queue
- Stop Local Triggers
- Run Local Triggers
- Repeat Trigger
- Time Trigger
- Disable Local Trigger
- Enable Local Trigger
- Notify Global Variable Changed
- Global Variable Changed Trigger
- Extract Text
- Find and Replace
- Return
- Extract Date and Time from Text
- Change Case for Text
- Add or Subtract from Date
- Download file from URL
- Format Date as Text
- Split Text
- Combine text
- AddDataRow
- AddQueueItem
- AddTransactionItem
- AppendLine
- BulkAddQueueItems
- ClearDataTable
- CompressZipFiles
- CopyFile
- CreateFile
- CreateFolder
- DeleteFileOrFolder
- DeleteQueueItems
- DeleteStorageFile
- DownloadStorageFile
- ExtractUnzipFiles
- FilterDataTable
- GetAsset
- GetCredential
- GetJobs
- GetQueueItem
- GetQueueItems
- GetResourceForLocalPath
- GetRowItem
- GetTransactionItem
- InvokeProcess
- JoinDataTables
- ListStorageFiles
- LookUpDataTable
- MergeDataTable
- MoveFile
- OrchestratorHTTPRequest
- OutputDataTable
- PathExists
- PostponeTransactionItem
- ReadStorageText
- ReadTextFile
- RemoveDataColumn
- RemoveDuplicateRows
- Replace
- SetAsset
- SetCredential
- SetTransactionProgress
- SetTransactionStatus
- SortDataTable
- StartJob
- StopJob
- UpdateRowItem
- UploadStorageFile
- WaitQueueItem
- WriteStorageText
- WriteTextFile
- Testing
- Release notes
- Project compatibility
- About the Testing activity package
- Project Settings
- Add Test Data Queue Item
- Address
- Attach Document
- Bulk Add Test Data Queue Items
- Delete Test Data Queue Items
- Get Test Data Queue Item
- Get Test Data Queue Items
- Given Name
- Last Name
- Random Date
- Random Number
- Random String
- Random Value
- Verify Control Attribute
- Verify Expression
- Verify Expression With Operator
- Verify Range
- Address
- AddTestDataQueueItem
- AttachDocument
- BulkAddTestDataQueueItems
- DeleteTestDataQueueItems
- GetTestDataQueueItem
- GetTestDataQueueItems
- GivenName
- LastName
- RandomDate
- RandomNumber
- RandomString
- RandomValue
- VerifyAreEqual
- VerifyAreNotEqual
- VerifyContains
- VerifyExpression
- VerifyExpressionWithOperator
- VerifyIsGreater
- VerifyIsGreaterOrEqual
- VerifyIsLess
- VerifyIsLessOrEqual
- VerifyIsRegexMatch
- VerifyRange
- Workflow Events
- Workflow Foundation
Advanced Logic
The Logic tab of the Form Designer allows you to create conditions and advanced logic scripts that can change the state or the behavior of the selected form component.
Using advanced logic you can dynamically change the controls, looks and feel of a form component.
A form logic consists of two parts: the trigger and the action.
Trigger The logic trigger is the condition upon which the action takes place. For example, you may want to display a specific form field only when a checkbox option is selected. In this case, the checkbox option is the trigger, and displaying the form field is the action.
There are four types of logic triggers:
Trigger type |
Description |
Example |
---|---|---|
Simple |
You define one triggering form component and value. | |
Javascript |
You provide a JavaScript logic for a form component or form data. Use the JavaScript syntax to create complex logic, such as loop or dynamic behavior. | |
JSON Logic |
You provide a JSON logic for a form component or form data. Recommended in cases where JavaScript is not permitted. Cannot support loops or dynamic behaviors. | |
Event |
You define a component event, which once emitted by the corresponding component, triggers the desired action. |
Action
The logic action is the form component behavior that should happen based on the logic conditions you set (i.e., the trigger). For example, you may want to activate a button for users of a specific age. In this case, the age range is the trigger, and activating the button is the action.
There are four types of logic actions:
Action type |
Description |
Example |
---|---|---|
Property |
The trigger changes one of the available component properties, such as Tooltip, Description, CSS class, etc. The available properties depend on the type of the triggering component. | |
Value |
The trigger changes the value of the corresponding component. The action must be defined using JavaScript syntax. | |
Merge Component Schema |
The trigger changes the component schema parameters found in the component JSON. To see the schema parameters you can change, hover over the corresponding component and click Edit JSON. You can change multiple parameters within one action. | |
Custom Action |
You define a custom action using JavaScript syntax, in the same you would define the JavaScript trigger type. | Â |
To configure an advanced logic:
- Open the Form Designer in the Create Form activity.
- Drag and drop components into your form. Pay attention to their field keys, as you might use those in your advanced logic.
- Navigate to the Logic tab of the component you want to change (i.e., the component upon which the action should take place).
- Click +Add Logic. You can add as many logics as you want.
- Enter a name for your logic.
- In the Trigger pane, select the type of trigger you want to use in your logic. The available types are Simple, Javascript, JSON Logic, and Event. Set the desired conditions to trigger the action.
- In the Action pane, click +Add Action. You can add as many actions as you want, all triggered by the logic that groups them.
- Enter a name for your action.
- Select the type of action you want to use. The available types are Property, Value, Merge Component Schema, and Custom Action. Set the desired effect of your action.
- When you are all set, click Save Action.
- To save your logic, click Save Logic.
The above procedure applies generically to any type of trigger or action. For a detailed procedure, check out the specific tutorials, which provide examples of each specific trigger and action type
- Trigger type: Javascript & Action type: Value Summing up two text fields dynamically
- Trigger type: Simple & Action type: Property Hiding a field dynamically
- Trigger type: Simple & Action type: Merge Component Schema Changing the title color dynamically
- Trigger type: Event & Action type: Custom Action Setting a form field to default using events
- Trigger type: JSON Logic & Action type: Property Displaying a component based on user input
Trigger type: JavaScript Action type: Value
This advanced logic sums up two text fields, based on the condition that the user interacts with the corresponding text fields.
- Open the Form Designer in the Create Form activity.
- Drag and drop three Text Field components into your form.
-
Name two of the text field components as
A
andB
, and name the third one asTotal
. Pay attention to their field keys, as you use those in your advanced logic.Optionally, you can set theTotal
text field component as Disabled, so business users cannot interact with it. - Go to the Logic tab of the
Total
field component. - Add a logic and name it "dynamic sum".
-
Select the Javascript trigger type, and enter the following script in the Text Area section:
result = true; return result;
result = true; return result;The above snippet detects if there are any changes in the text fields, i.e., the user interacts with the text fields, and triggers the action to sum up the fields.
- Add an action and name it "a+b".
-
Select the Value action type, and enter the following script in the Value (Javascript) section:
result = (+data.a) + (+data.b); return result;
result = (+data.a) + (+data.b); return result;Replacea
andb
with the field keys values of the text field components. - Save the action and the logic.
- Save the component.
A
and B
, the Total
field gets automatically filled in, displaying the sum of A and B.
Trigger type: Simple Action type: Property
Child field
) when the user inputs "hide" in another form field (i.e., Parent field
).
- Open the Form Designer in the Create Form activity.
- Drag and drop two Text Field components.
- Name one of the text field components as
Parent field
, and the other one asChild field
. Pay attention to their field keys, as you use those in your advanced logic. - Go to the Logic tab of the
Child field
component. - Add a logic and name it "hide input".
-
Select the Simple trigger type.
6.1. From the When the form component dropdown menu, selectParent field ({parentField_field_key})
.6.2. In the Has the value field, enter "hide".
The above configuration detects if the user input the string "hide" in the parent field and triggers the action to hide the child field.
- Add an action and name it "hide".
-
Select the Property action type.
8.1. From the Component Property dropdown menu, select Hidden.
8.2. From the Set State dropdown menu, select True.
- Save the action and the logic.
- Save the component.
At runtime, if the business user inputs "hide" in the parent field, the child field becomes hidden.
Trigger type: Simple Action type: Merge Component Schema
This advanced logic changes the label color of a text field component when the user select the desired color from a list. The change applies using a custom CSS file.
Prerequisites:
Create a CSS file containing the new color for the text field label and reference it in the Create Form activity, in the LocalCSSFilePath activity property.
For example, the CSS snippet below contains a class that sets the label color to green or red:
.textFieldLabel-green
{
color : green;
}
.textFieldLabel-red
{
color : red;
}
.textFieldLabel-green
{
color : green;
}
.textFieldLabel-red
{
color : red;
}
After referencing the CSS file in the Create Form properties, design your form following the steps below:
- Open the Form Designer in the Create Form activity.
- Drag and drop one Text Field component and one Radio component. Pay attention to their field keys, as you use those in your advanced logic.
-
In the Display tab of the text field component, set a default Custom CSS Class. For example, to set red as the default color of the text field, use the
textFieldLabel-red
class. The class must be defined in the CSS file from the prerequisites documented above. - For the Radio component, add two values for the colors
green
andred
. - Go to the Logic tab of the Text Field component.
- Add a logic and name it "color selection".
-
Select the Simple trigger type.
7.1. From the When the form component dropdown menu, selectRadio ({radio_field_key})
.7.2. In the Has the value field, enter "green".
The above configuration detects if the user selects "green" from the radio options and triggers the action to change the text field label color.
- Add an action and name it "change color using css".
-
Select the Merge Schema Component action type and enter the following snippet:
return { customClass: "textFieldLabel-green" }
return { customClass: "textFieldLabel-green" } - Save the action and the logic.
- Save the component.
At runtime, if the business user selects the "green" radio button, the label of the text field becomes green. If the user selects the "red" radio button, the label of the text field becomes red.
Trigger type: Event Action type: Custom Action
This advanced logic changes the content of a text field when the user clicks a button. The button emits an event based on which the text field content changes to a default text.
- Open the Form Designer in the Create Form activity.
- Drag and drop one Text Field component and one Button component. Pay attention to the components field keys, as you use those in your advanced logic.
-
In the Display tab of the button component:
3.1. Label the button component asChange value to "Default"
3.2. Set the button Action as Click
3.3. Select the Use for Local Update checkbox.
3.4. Input the following snippet in the Update Data Logic section. This emits the event calledresetTextField
every time the user clicks the button.instance.emit('resetTextField', {});
instance.emit('resetTextField', {});3.5. Save the button component.
- Go to the Logic tab of the text field component.
- Add a logic and name it "reset".
- Select the Event trigger type.
-
In the Event Name field, enter the name of the event emitted when clicking the button. (i.e.,
resetTextField
).The above configuration detects when the user click theChange value to "Default"
button and replaces the text field existing content to "Default". - Add an action and name it "default".
- Select the Custom Action action type.
-
Input the following snippet in the Custom Action (Javascript) section.
return "Default"
return "Default" - Save the action and the logic.
- Save the component.
Change value to "Default"
button, the resetTextField
event is emitted. The trigger listens to the event and replaces the existing text field content to "Default".
Trigger type: JSON Logic Action type: Property
This advanced logic displays the content of an HTML component (in this case, an image) when the user inputs the required text.
- Open the Form Designer in the Create Form activity.
- Drag and drop one Text Field component and one HTML Element component. Pay attention to the components field keys, as you use those in your advanced logic.
-
In the Display tab of the text field component:
3.1. Label the text field component as "Type "Show me"".
3.2. Add the Description "Must be an exact match (case sensitive)", to indicate users they must input the text as required.
3.3. Save the text field component.
-
In the Display tab of the HTML element component:
4.1. In the Content section, reference the image you want to display. For example:<img href="https://picsum.photos/200/300" />
.4.2. Select the Hidden checkbox, to hide the image from displaying by default. 4.3. Save the HTML element component.
- Go to the Logic tab of the HTML element component.
- Add a logic and name it "user input".
- Select the JSON Logic trigger type.
-
Input the following snippet in the JSON Logic section, and replace
{text_field_component_field_key}
with the field key value you set for your text field component.{ "===": [ { "var": "data.{text_field_component_field_key}" }, "Show me" ] }
{ "===": [ { "var": "data.{text_field_component_field_key}" }, "Show me" ] }The above configuration detects when the user inputs "Show me" and only then sets the value of the HTML element Hidden property to False, thus displaying the corresponding HTML content.
- Add an action and name it "display image".
-
Select the Property action type.
10.1. From the Component Property dropdown menu, select Hidden.
10.2. From the Set State dropdown menu, select False.
- Save the action and the logic.
- Save the component.
At runtime, if the user inputs the required text in the text field, the form displays the HTML content.
To check the complete workflow or to have a future reference, download the XAML example