Overview
In Mirata, there are three types of action buttons. The purpose of this article is to understand each type and see a brief example of when to use each type.
Types of Action Buttons
Workflow Transition
Launch URL
Search (Query)
Workflow Transition Button - Example
Suppose the designer wanted to have a button to send an email (assume this integration action has already been created). The designer can use a workflow transition button to reference run this integration action.
Create a transaction
Turn off "Show Button" property in main Properties window
Connect the relevant integration action to the workflow
Add a Workflow Transition Button to the form
Name and label this button
Add additional formatting as necessary
Connect the transaction to the button in Control properties
Navigate to Preview and test the button
Launch URL Button - Example
Suppose for this example, we wanted a button to navigate the user to Google. To create a URL button, the main thing that is needed is the destination URL. The process for configuring the Launch URL button is as follows:
Place a Launch URL button on the form
Navigate to the Control properties
Name and label this button
Add additional formatting as necessary
Enter the destination URL
Navigate to Inbox to check to see if the link is working properly
Launch URL buttons will not work in Preview mode
Search Button - Example
Suppose that there is a table (see below) and the user wants to query the student name and their score based on their StudentID. We can use a combination of a Search Button + a query (integration action) to do so.
To set up this simple Query integration action, there needs to be a query in place that can be connected to the button. This is a simple outline for creating this data table request. For more detailed information about data table requests, please visit another Mirata article.
Set the Action Request Type to Data Table Request
On the Request tab
Set the Data Table to the Demo Table
Set the Request Type to Query
Add StudentID as a Query parameter
Change the constant for the parameter to a input parameter (so the user on the form will need to enter the student ID to pull down data)
Now that the Query is configured in the Admin tool, there needs to be 1 (text) field on the form for the user to enter the StudentID and then there needs to be a Search Button control that is connected to the query. Make sure to name and label the Search button.
In addition to this, there needs to be a place where the information that is being pulled down from the Query will land. Add a simple list control underneath the button and inside the list item, add two fields; Name (text) and Score (integer) - just like how the fields are named in the data table. It would also be a good idea to make the initial value for the entire list to be "number of items" and set that to 1 (so that the user does not need to click "+ Add Row" to see a new list entry).
It is extremely important to name the fields in the list the same names as the table so that the Query knows which fields to populate when the button is run.
After setting up the list, it must be connected to the Search Button by selecting the entire array as the Result Field in the Control properties section for the button:
The last step before finishing the set-up is to connect the Query Parameter (StudentID) to the StudentID text field on the form. This is the value that is going to be passed through the Query to find the return fields.
Click on the blue "QUERY MAPPINGS" button on the Control Properties of the Search button
Click on the "+" button on the top right corner of the screen
Type "StudentID" as the Key
Click the grey arrow to the right of the field column to select the StudentID form field
Click the checkbox when done to save this key:field pair
Click "OK" in the bottom right corner
When the Query Mappings are set, navigate to Preview mode to test this. Simply enter one of the StudentID values contained in the backend data table and then click the Search button that was created. The list that was put on the form should populate with the correct student name and score associated with that StudentID.