Calculate Action

This page is for application designers who need to configure functionality for components or events. It explains the properties for the calculate node and associated expressions, which is part of an actionflow.

Overview

Use a  Calculate node to manipulate data that is passed to it. Calculate nodes have their own attributes, which can reference incoming data via expressions using one or more of the 115+ functions available in PhixFlow.

Example

Click to play the following video that shows an example of using a calculate node in an actionflow.

The video shows an actionflow that opens a new screen containing a dynamic text field. It then populates the dynamic text field with a message, which is set in a calculate node attribute. The steps for are:

  1. Drag a calculate node from the toolbar and drop it into the actionflow diagram.
  2. Name the calculate something meaningful, e.g. Set Message
  3. Disconnect the  Open Screen node from the  Driving interface connection point.
  4. Connect the  Driving interface connection point to the  Calculate node.
  5. To pass data into the actionflow, go to the Inputs section on the left. Connect the component input connection point ScreenToOpen to the calculate node.
  6. Click on the calculate node to open its properties.
  7. In the Attributes section, add a new calculate attribute and set:
    1. Name to Message
    2. Expression to:

      "You have successfully set up a calculate node" 
  8. Map the calculate attribute to the dynamic text field on the screen as follows: 
    1. Right-click on the connection and click Configure Mappings.

    2. Drag the Message attribute from the calculate node, on the left, to the Message attribute on the open screen, on the right.
    3. Close the mapping screen.
  9. The actionflow configuration is complete.

After configuring an actionflow, always test the actionflow to make sure it works.


 Properties Tab

Property Pane Toolbar

For information about the toolbar options, see the Common Properties page, Toolbars and Controls section.

Parent Details

If this item is within or belongs to another, its parent name is shown here. See the Parent Details section on the Common Properties page for more details.

Basic Settings

FieldDescription
NameEnter the name for the action node.
Show in the Repository

An application can have many actionflows, and an individual actionflow can have many nodes. This can lead to many items being listed under Actionflow in the repository. Use this option to omit the node from the repository.

 to display this node in the repository.

 to omit this node from the repository.

Pass Through

Specify whether or not to allow data that has not been processed to pass through to the next action node. 

 Untick to prevent data that is not processed by this node from passing to the next action node. 

 Tick to allow data that is not processed to pass through to the next action node.

Input Connection Points

This section has a toolbar with standard buttonsThe grid contains a list of the connection points that connect into this calculate node.

  • To add a new input connection point, in the section toolbar click  Add New  and set the properties.
  • To edit an existing connection point, double-click it in the list to open its properties.
  • To remove a connection points, select one and in the section toolbar click  Delete.

For details about the Name, Type and Data Attributes properties of the input connection point, see Input Connection Points.

Calculate Attributes

Calculate actions process data using expressions; see pages in the topic Expressions and PhixScripts.

This section has a toolbar with standard buttonsThe grid contains a list of the expressions that the calculate action will perform. 

  • To add a new expression, in the section toolbar click  Add New to open a new expression and set the properties.
  • To edit an existing expression, double-click it in the list to open its properties.
  • To remove an expression, select one and in the section toolbar click  Delete.
  • To reorder an attribute, drag and drop the attribute into the desired position. Alternatively, double-click to open its properties and update the Order field.
  • Click  Add New. PhixFlow opens the properties for a new calculate attribute; see Calculate Attributes Properties, below.

Description

We recommend that you always enter a description to explain the purpose of this item.

 Audit Tab

Audit Summary

See the Common Properties page, Audit Summary section.

Calculate Attributes Properties 

 Properties Tab

Property Pane Toolbar

For information about the toolbar options, see the Common Properties page, Toolbars and Controls section.

Parent Details

If this item is within or belongs to another, its parent name is shown here. See the Parent Details section on the Common Properties page for more details.

Basic Settings

Field

Description
NameEnter the name of the calculate attribute.
Type

Select one of the data types:

  • String
  • Bigstring
  • Integer
  • Float
  • Decimal
  • Date
  • Datetime
  • Graphic
  • TrueFalse
  • Structured Data

Make sure you select the same data type as that of the attribute to which you are mapping; see Understanding Data Types.

Attribute Name

 Tick to indicate the calculate attribute matches the name of an attribute in the data.

 Untick to indicate the calculate attribute does not have the same name as an attribute in the data. In this case you will need to map the data attribute to this calculate attribute.

Expression

Enter an expression. To work in a larger popup window, click  Show field in a large editor.

See also:

Order

Where the calculate action runs multiple expressions, enter a number to indicate the order in which this expression will be run.

Remember that an expression that generates a value must run before any expression that uses the value.

 Audit Tab

Audit Summary

See the Common Properties page, Audit Summary section.

Save and close the calculate attribute properties to return to the calculate properties.

Sections on this page

Learn More

For links to all pages in this topic, see Understanding Actionflows


Terminology changes in progress

As part of the redesign of PhixFlow, we are changing the following terms:

dashboard → screen   
stream → table
stream attributes → attributes
stream item → record
stream set → recordset
stream view → view
stream item action → record-action 
stream action → table-action
driver class → database driver