We can embed actions within a grid to perform specific activities, such as deleting the record or sending an email. For our example, we will enable users to click a button and make a call.
- On the Companies grid click Telephone Button.
- We will set Label to
Call,
as it will it will be clearer to our users. - Click the Action tab.
- Action Method, Actionflow.
- Actionflow, click
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
. - Name, CallCompany.
- Click Confirm.
- The actionflow will open. We will look at actionflows in more detail later in the course. Here we will setup set up a simple actionflow:
- Click on Connect, in the dialog dialogue that opens click Companies. This tell tells PhixFlow we need data from the companies grid.
- Click Connect Input.
- In the mapping screen that opens, drag Number to the right-hand side and click Confirm Mappings, as illustrated below. This creates an input mapping attribute that the actionflow can use:
- From the Actionflow toolbar add a Calculate node. We will use this to construct the action details action.
- Name
it- ,
callDetails
, and click - Click Create Action.
- Now we need to connect the Input Connection to the Calculate node action. Click and hold on the input connection point and drag it over the calculate nodeCalculate as illustrated here:
- Click on the pipe between the two items.
- In the The mapping screen appears, drag Number to the right. This will allow us to work with the value in incoming attributes within the calculate action node.
- Click n Then click Confirm Mappings.
- Click on the Calculate nodeaction, and in its properties click add in the Calculate Attributes section.
- Name,
CallNumber
. - Expression,
"callto:" + in.Number
- Save your changes,
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
.
- From the Actionflow toolbar add an Open URL node action.
- Name it,
Make Call
, and click - Click Create Action.
- Connect the nodesaction. Hover over CallDelatils and click out, move your mouse over MakeCall and click., as illustrated here:
- Image Modified
- In the mapping screen that opens, drag CallNumber to URL.
- Click Confirm Mapping.
- To access the mappings at any point click the pipe connecting the two action nodes.
- Close the Actionflow.
- On the view attribute TelephoneButton, we we see the actionflow has been set.
- It is recommended that an icon be set for the action button to indicate its purpose.
- Create an Action Icon Style
- Name,
TelephoneCall
. - Background Image, add add the phone-call.svg icon from the zip downloaded earlier.
- Background Repeat,
no-repeat
. - Background Position,
center
. - Background Size,
contain
. This resizes the image to make it fit into the available space and is a useful CSS property. - Then click .
- Finally,
- In the CSS Properties, click
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
. - CSS Tag,
opacity
. - Value, 1
- Save all changes.
- If you lock the screen, clicking the call button will open your computer's default call software.
Check Point
The screen should look similar to this:
In-Grid Editing
PhixFlow can be configured to allow users to make edits to records directly in a grid.
- Open the View Configuration for the Companies grid.
- Right-click and select Show the View Configuration.
In the Advanced section, tick Insert excerpt |
---|
| _view_show_config |
---|
| _view_show_config |
---|
nopanel | true |
---|
|
.
- On the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
, Action Settings section, toggle on Insert excerpt |
---|
| _toggle_on |
---|
| _toggle_on |
---|
nopanel | true |
---|
|
Auto Save.- This will automatically save any changes made in the grid, however, it is possible to specify an action that goes beyond a simple save such as performing validation of input.
In
- Click on the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
and in the View Attributes section, double-click Web. - In the Grid Settings section, untick Read Only.
- This allows us to type into the field directly.
- Relational attributes will appear as a drop down list. Adding non-primary table attributes from a related table onto the form will be added as Read-Only by default.
- Save your changes.
Insert excerpt |
---|
| Creating a Grid |
---|
| Creating a Grid |
---|
name | autosave |
---|
nopanel | true |
---|
|
Testing
Switch to
mode and _mode | | _app_mode |
---|
nopanel | true |
---|
|
and double-click a cell in the Website column to add a website to a company. Note for a save to occur the user must click out of the cell they updated.