Multiple Constants
Description
Create one or more constant values to add to as new fields in a Flow. New columns are created for the results.
Constant values are useful when reference values are needed.
Supported Data Types for Constant Values
- Big Decimal
- Boolean
- Date_Time
- Double
- Long
- String
Dates can be created as either a constant date or a dynamic date.
Constant date:
- A specific date/time value.
Dynamic date:
- A variable date/time value created with functions and/or operator symbols.
Dynamic Date Guide
Supported Function
Function | Description |
---|---|
now() | Use the function "now()" as a dynamic date that sets the time/date value to Hero Platform_'s internal clock value when the Flow is run. |
Supported operators
Operator symbol | Description |
---|---|
+ | Adds to the date/time value based on the date/time unit entered. |
- | Subtracts from the date/time value based on the date/time unit entered. |
Supported temporal units
Time/Date unit symbol | Description |
---|---|
s | Seconds |
min | Minutes |
h | Hours |
d | Days |
w | Weeks |
m | Months |
y | Years |
Example
The goal is to use IsAfter to filter results with date values that are within the past five minutes from the current time.
- Select the IsAfter filter function.
- In the function configuration:
- Select a date/time value in the first field.
- Enter "now() -5min" in the second field.
- Click OK.
Use
- Enter the output field name.
- Select a data type for the constant value.
- Enter a constant value.
- Add additional constant values. (optional)
Example
Drop-down List Values
The user wants to assign values for drop-down fields in Robin.
MultipleConstant() returns | MultipleConstant() returns | MultipleConstant() returns |
---|---|---|
Active | Inactive | Unknown |
It is then possible to use the List function to turn each of these values into an element in a list that can be used to create the Robin drop-down menu.
Hero Platform_ Example
An example of this function can be found in Hero Platform_'s library of examples.
Download the example titled "function_MultipleConstants" to see an example of this function.
Type