Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
What is an Open URL Action?
The
action opens a URL in a new tab. This action node can also be configured to send emails and call telephone numbers. Insert excerpt _action_url _action_url nopanel true
The
action node contains three input parameters, which can be mapped onto: Insert excerpt _action_url _action_url nopanel true
To open a webpage, a valid URL must be mapped onto the URL attribute, in the format:
For the full list of Open URL
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Creating Open URL Actions
- Click and drag the
icon in the toolbar onto the canvasInsert excerpt _action_url _action_url nopanel true - Enter a name for the Open URL action, then select Create Action
- In the Open URL Action
on the right, the available Input Parameters can be seenInsert excerpt _property_settings _property_settings nopanel true
Opening a Webpage Example
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
To open a webpage, a valid URL must be mapped onto the URL attribute, in the format:
If you want the application user to provide the URL, use a
The following video shows how an application user types a URL into a field, and the web page then opens. The underlying Actionflow includes an Open URL node, as follows: |
Sending an Email Example
Expand | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||
Use the Open URL action to send an email, a valid email address must be mapped to the URL attribute in the format:
The function 'mailto:' causes the browser to open an appropriate email web client and sets the email address to the one provided. Provide different URL expressions to populate the email:
Subject
CC
BCC
Body Text
Adding Body Text LinesThe body is by default one line and will wordwrap according to the email client settings. In order to split the body over multiple lines or paragraphs, use: For example, to generate the following email body text: This is the body of the email. This is the second line of the body of the email. specify:
Combining FieldsThe following expression shows how to create all the different email fields using one expression:
|
Calling a Telephone Number Example
Expand | |||||
---|---|---|---|---|---|
| |||||
Use the Open URL action to make a VoIP call to a telephone number. Map a valid telephone number to the URL attribute as follows:
The function |
HTML Comment | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
Worked Example
Here's a worked example using the School Data (available from the Learning Centre).
In this example, we are using:
- A Teacher Management screen containing a grid of the School Teachers data - this screen was created using the Tile with Buttons template
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 Foundation Application. For this example, we'll be working on the Teachers data on the Teacher Management screen. |
We want an icon in the Teachers grid, on the Teacher Management screen, to open a webpage when clicked. To do this, we will configure an Open URL Action that opens a specified URL when the user clicks an icon.
Open URL Action to Open Webpage
Setup the Input
- 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 - Here you will find a blank Actionflow, FindAddress, along with the Action Icon Style you can see in the grid:
- Click on the Actionflow link, , to open the blank Actionflow
- Select Click to Connect and for the input, choose the School_Teachers
View datasource, then select Connect InputInsert excerpt _view_show_icononly _view_show_icononly nopanel true - On the Mappings window, drag the attribute, Address, from the left (Teachers View) into the Drag and Drop area on the right (Input Connection Point)
- Select Save
- Click and drag the
icon from the toolbar onto the canvasInsert excerpt _action_url _action_url nopanel true - In the Create Open URL Action window enter:
- Name:
Open Map
- Select Create Action
- Name:
Click and drag the
icon onto theInsert excerpt _driving_interface_connection_point _driving_interface_connection_point name icon nopanel true
action action nodeInsert excerpt _action_url _action_url nopanel true titleExpand
Checkpoint
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 Google maps search.
- Click and drag the
icon from the toolbar onto the canvasInsert excerpt _action_calculate _action_calculate nopanel true - In the Create Calculate Action window enter:
- Name:
Add Prefix
- Select Create Action
- Name:
Drag the Add Prefix Calculate Action node onto the in connector between the
node and theInsert excerpt _input _input nopanel true
Open Map action node and drop it when theInsert excerpt _action_url _action_url nopanel true
icon appearsInsert excerpt _add_icon _add_icon nopanel true - Right-click on the in connector between the
node and theInsert excerpt _input _input nopanel true
and selectInsert excerpt _actionflow_calculate _actionflow_calculate nopanel true Insert excerpt _open_mappings _open_mappings nopanel true - On the Mappings window, drag the Address attribute from the left into the Drag and Drop area on the right (calculate action)
- Select Save
- Click on the Add Prefix Calculate Action to open its
and in the Output Attributes section clickInsert excerpt _property_settings _property_settings nopanel true Insert excerpt _addIcon _addIcon nopanel true - Create the following attribute:
- Name:
PrefixedAddress
- Type: choose String
Expression:
Code Block language js theme Emacs "https://www.google.com/search?q=maps/place/"+in.Address
Select
Insert excerpt _finish _finish nopanel true
- Name:
Right-click on the in connector between the
action and theInsert excerpt _action_calculate _action_calculate nopanel true
action and selectInsert excerpt _action_url _action_url nopanel true Insert excerpt _open_mappings _open_mappings nopanel true On the Mappings window, drag the PrefixedAddress attribute from the left (Calculate Action) onto the URL input parameter on the right (Open URL Action)
Select Save
expandtitle
Checkpoint
- Close the Actionflow to return to the Teacher Management screen
the screen and press the icon for a record to see the Actionflow in actionInsert excerpt _lock _lock nopanel true - We can see that the Actionflow is working because a new tab will open in your browser, with the teacher's address line in a Google search
- maps search
Note | ||
---|---|---|
| ||
The Address data is dummy data and therefore may not show a real address on Google maps. You can tell that the Actionflow has been configured correctly if the address line shows in the URL, e.g. https://www.google.com/maps/place/5%20Cherokee%20Court |