Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Why set Minimum and Maximum Records?
On an Actionflow's
connection point(s), a minimum and maximum number of records that should be received by the Actionflow can be set. If the number of records received is not within the minset minimum/max maximum threshold set then , an error message will show. Insert excerpt _input _input nopanel true
This can be useful for:
- Ensuring at least one record is selected before proceeding with an edit
Setting Minimum and Maximum Records
- Click on the
node to open itsInsert excerpt _input _input nopanel true Insert excerpt _property_tabs _property_tabs nopanel true - Expand the Validation section
- Enter a number for Minimum Records and/or Maximum Records
the propertiesInsert excerpt _finish _finish nopanel true
Worked Example
Here's a worked example using the Shop Data (available from the Learning Centre).
In this example, we are using:
- A Shop StockStaff screen containing a grid of the Shop Stock data, a pie chart of the Shop Stock data and a grid of the Shop Departments data - this Staff data - this screen was created using theMulti- Tile with Buttons template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Intermediate Application. For this example, we'll be working on the grid on the Shop Stock screenStaff screen. |
GIF/SCREENSHOT OF FINISHED RESULT
Counting StockConfiguring a Maximum Records Threshold
In this example, we'll create an Actionflow to count the quantity of stock in our Shop Stock data and map this amount back to the screen to display in a field. We'll set
Screen Setup
set a maximum number of records that can be edited at once.
- Open the Shop Staff screen
- Open the Actionflow on the Edit button
- Click on the
to:Insert excerpt _paletteinput _paletteinput nopanel true - Add an Area - Row and position this under the Shop Stock grid
- Add a button of your choice to this area - this button will initiate the counting Actionflow
- Give this button a suitable name, i.e.
Count Stock
- Give this button a suitable name, i.e.
- Add a String Form Field to this area - this area will display the value returned by the Actionflow
- Style the components in this area to your choosing
Actionflow Setup
- Open
hidden | true |
---|
- node to open its
Insert excerpt _property_tabs _property_tabs nopanel true - Expand the Validation section
- For Maximum Records, enter
1
the propertiesInsert excerpt _finish _finish nopanel true
- Close the Actionflow
- Close and reopen the Shop Staff screen to ensure the changes have taken effect
- To see the Actionflow in action, select multiple records on the Staff grid using the tick boxes, then click Edit
- An error message will show