Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Enter the name that will be used to display this action on a Stream View ??Where and why does a stream view display an action??
A stream view can have a default action set against it
stream , PhixFlow runs the default actionYou can configure the action behaviour based on the data in the record. action pop-up action the dashboard tickedticked dashboard dashboard tickedticked dashboardA grid listing the context parameters. Double-click to open the properties for a context parameter
Confirmation Message
If this flag is ticked, a message will pop up asking the user if they want to proceed with the action. By default, the message is:
Please confirm that you want to apply action Action Name
To provide a customised confirmation message, use the next field.
File Upload
If this flag is ticked, users will be prompted to browse to a file and select it for upload when they run this action.
An expression that sets the value of the tag for the file. You can use this tag in a file collector to read into PhixFlow files that the action has uploaded.
The tag expression can refer to:
- any values entered on the Form View using:
Code Block |
---|
_prompt.<Form Field Name> |
- the values of any Context Parameters using:
Code Block |
---|
_context.<ContextParameter Name> |
- any attributes of any records selected on the view or dashboard from which the action was initiated using:
Code Block |
---|
<View name or alias>.<Attribute name or alias> |
List of names of uploaded files can be accessed through _files
variable.
Action Validation
The validation expression is evaluated at the start of any Insert or Update actions. If the validation expression generates any error messages (using the error function) then the action is abandoned. The validation expression is not used to decide whether or not to run the selected task plan.
The validation expression can include multiple statements by wrapping them in a do() clause. A number of internal variables are available in these expressions:
- _this: A reference to all the selected records within the view to perform the action on.
- _prompt: A reference to all the user prompted action attributes.
The usual message functions debug(message), info(message), warning(message), and error(message) are all available to be used in these expressions and will result in messages being written to the system console logs.
Be careful when using the error(message) function - this will stop the action from being completed.
Example 1
Validate that the sum of the selected record amounts equate to zero before allowing the action to be executed.
Code Block |
---|
if(sum(_this.amount) == 0, info('OK'), error('Not performing Action as the Sum does not equate to zero')) |
Example 2
Validate that the user entered comment is at least 10 characters long, else write a warning to the log.
Code Block |
---|
if(stringLength(_prompt.UserComment) >= 10, info('OK'), warning('Comment should be at least 10 characters')) |
Using values from other views
You can also refer to records selected in other dashboard views by using their dashboard element names. E.g. if the dashboard also contains a view with database element name ACCTS
, you could use the following in your validation expression:
Action Rules
When the action runs, PhixFlow
A list of rules that determine which of the listed Stream Item Actions will run. : see Stream Item Action RuleStream streamLayoutLayoutLayouttickedticked reference any context parameter.Access Permissions
For details about how to control access to an action, see Common Properties → Access Permissions.
tickedticked dashboardtickedticked dashboard stream streamstream streams stream Form View dashboard Context Parameters dashboard deletes will take place. dashboardStream view directly dashboard dashboard_form
acts the viewcurrently displayed on the form
_grid
acts on the record_gridRow
acts on the record