By the end of this chapter you will understand what an Open URL action is and how to use them, and you will have created a Open URL Actionflow in your application.
What is an Open URL Action?
The Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
action opens a URL in a new tab. This action node can also be configured to send emails and call telephone numbers. Now we have the Send Emails Action, should we remove the reference to emails from this?
The Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
action node contains three input parameters, which can be mapped onto:
To open a webpage, a valid URL must be mapped onto the URL attribute, in the format:
Code Block |
---|
https://www.url.com |
Creating Open URL Actions
- Click and drag the
Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
icon in the toolbar onto the canvas - Enter a name for the Open URL action, then select Create Action
- In the Open URL Action
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
on the right, the available Input Parameters can be seen
HTML Comment |
---|
|
Insert excerpt |
---|
| Open URL Node |
---|
| Open URL Node |
---|
nopanel | true |
---|
|
|
Worked Example
Here's a worked example using the School Data (available from the Learning Centre).
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, this data has already been pre-loaded into the Actionflow Application. |
In this example, we will use the Teachers grid data on the Teacher Management screen to configure an icon in a button grid to open a webpage.
Expand |
---|
|
Image Added |
Open URL Action to Open Webpage
- On the Teacher Management screen, where the Actionflow will be initiated from, click on the attribute, Find Address, on the grid (column header) to open the View Attribute
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
- Click on the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
- Image Added
- Here you will find a blank Actionflow, FindAddress, along with the Action Icon Style you can see in the grid - Image Added
- Click on the Actionflow link, Image Added, to open the blank Actionflow
- Select Click to Connect and for the input, choose the School_Teachers
Insert excerpt |
---|
| _view_show_icononly |
---|
| _view_show_icononly |
---|
nopanel | true |
---|
|
View datasource, then select Connect Input - On the Mappings window, drag the attribute, Address, from the left (Teachers View) to the right (Input Connection Point)
- Select Save
- Click and drag the
Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
icon from the toolbar onto the canvas - In the Create Open URL Action window enter:
- Name:
Open Map
- Select Create Action
- Click and drag the
Insert excerpt |
---|
| _driving_interface_connection_point |
---|
| _driving_interface_connection_point |
---|
name | icon |
---|
nopanel | true |
---|
|
icon onto the Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
action node
Setup the Calculate and Open URL Action
We need to add a Calculate Action to the FindAddress Actionflow because the attribute data we want to use for our Open URL node is not in a URL format. We will use a calculate node to turn our address data into a google search.
- Click and drag the
Insert excerpt |
---|
| _action_calculate |
---|
| _action_calculate |
---|
nopanel | true |
---|
|
icon from the toolbar onto the canvas - In the Create Calculate Action window enter:
- Name:
Add Prefix
- Select Create Action
Drag the Add Prefix Calculate Action node onto the in connector between the
node and the Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
Open Map node and drop it when the Insert excerpt |
---|
| _add_icon |
---|
| _add_icon |
---|
nopanel | true |
---|
|
icon appears- Right-click on the in connector between the node and the
Insert excerpt |
---|
| _actionflow_calculate |
---|
| _actionflow_calculate |
---|
nopanel | true |
---|
|
and select Insert excerpt |
---|
| _open_mappings |
---|
| _open_mappings |
---|
nopanel | true |
---|
|
- On the Mappings window, drag the Address attribute from the left to the right (calculate action)
- Select Save
- Click on the Add Prefix Calculate Action to open its
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
and in the Output Attributes section click Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
- Create the following attribute:
- Name:
PrefixedAddress
- Type: choose
String
Expression:
Code Block |
---|
"https://www.google.com/search?q="+in.Address |
Select
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
Right-click on the in connector between the Insert excerpt |
---|
| _action_calculate |
---|
| _action_calculate |
---|
nopanel | true |
---|
|
node and the
Insert excerpt |
---|
| _action_url |
---|
| _action_url |
---|
nopanel | true |
---|
|
and select Insert excerpt |
---|
| _open_mappings |
---|
| _open_mappings |
---|
nopanel | true |
---|
|
On the Mappings window, drag the Address attribute from the left (Calculate Action) onto the URL input parameter on the right (Open URL Action)
- Select Save
- Close the Actionflow to return to the Teacher Management screen
- the screen and press the Image Added icon for a record to see the Actionflow in action
- We can see that the Actionflow is working because a new tab will open in your browser, with the Address line in a Google search