Concatenate Text action
Use the Concatenate Text logic block action to take two or more text values and concatenate, or string them together. Use the concatenated value in a field, as a variable, or as a new variable.
When you use this action, select one or more inputs. An input can be any of the following:
- Field—A field in a table that is in-scope of the logic block.
- Variable—A variable that is in-scope of the Concatenate Text action.
- Constant—A user-defined value such as a letter, number, or symbol.
Use this action to connect multiple text values, and then use the concatenated value in a field or as a variable.
Add inputs in the action in the order that you want to concatenate them. Use the input type of Constant to add characters to the concatenated value.
For example, let's say your company uses a unique ID number to identify financial transactions. This identification number has three parts:
- Transaction number
- Account number for the transaction
- ID number of the employee that created the transaction record
Using the Concatenate Text action, you can combine these values into a transaction identification number. In the action, define these fields as inputs: Transaction Number, Account Number, and Employee ID. Set the output to the Transaction ID Number field.
Given a record with the following values for the input fields, the concatenated output for the Transaction ID Number field would be 19821006982.
| Field | Value |
|---|---|
| Transaction Number | 1982 |
| Account Number | 1006 |
| Employee ID | 982 |
Convert to Text action
The Convert to Text action allows you to convert field values, such as numbers, to text. Use the Convert to Text action to change the value of a non-text data item to text so that values can be compared to text values and manipulated.
For example, in an application used to enter bank deposits, you can use a Convert To Text action to convert the Deposit Transaction Number, which is a number, to text. You could then use another action to concatenate the transaction number and other information into a unique ID.
In the From section of the action, you can choose from different value types to convert to text including field values, system values, and variables.
In the To section of the action you can output converted values to different value types including:
- Variable—select a variable previously defined in the logic block.
- New variable—enter a name to define a new variable that can be used in subsequent actions.
- Text field—select a table, and then select a field.
Text Manipulation action
Use the Text Manipulation action to configure string values with various string manipulation operations. Select parts of the string text so that the string manipulation function applies to a selected output.
| Operation | Function | Example |
|---|---|---|
Slice | Retrieve a part of the input text. Start with selecting a starting index with either:
Then define a length of characters that you want to include. If you started with -1, you work backwards negatively. | If you have the text value input,
|
Replace | Replace a substring, or a portion of the string, within your input string. These values can all come from a variable, field, or constant. | If you have a text value input of This replaces all instances of the substring so for example if you have |
Split | Split off a substring of the input string by selecting a piece of the original string, and displaying the substring as the output. | If you want |
Trim | Cut off a sequence of characters from the beginning or end or both from a string. | If you want to trim the number
Trimming |
Find | Find an instance of a substring in the original input string. It returns the index of the first found substring or -1 if not found. | If you have an input of |
Length | Identify the number of characters that make up the length of a string. | If you have Hello world as an input, it yields an output of 11. |
To Lower Case | Convert an entire string to lower case and convert the value as the output. | Hello world displays as hello world. |
To Upper Case | Convert an entire string to upper case and convert the value as the output. | Hello world displays as HELLO WORLD. |
Math actions
You can use different logic block actions to complete math actions using values in your application.
For example, you can:
- Add
- Subtract
- Multiply
- Divide
When you use one of these actions you define the inputs and the output. The inputs are the values used in the calculation. They can be variables, such as today's date, or fields in the application. You can also define the input value as a constant. Every time you use a constant in an action you must define the value because constants cannot be reused. In math actions, a constant can be a number or a currency value. The output is where the calculated value is used, and whether the calculated value is stored as a variable or in a field. Outputs that are variables only exist within the logic block, and outputs that are fields are stored with the application.
For example, if you use a Subtract action to calculate the remaining balance for a general ledger application your inputs would be Balance Due minus Payments Applied. You would define your output either as a variable named Remaining Balance to be used later in the logic block, or save the output to the Remaining Balance field to be saved in the application.
Values
For a math action, when you add an input or an output, the first field you define is the value type. Value types include:
- Field—a field that the logic block has access to. You can use fields from the current table, a secondary table, or a module setting.
- Constant—a user-defined value. This can be a number or a currency value. This type is only valid for input values.
- Variable—a variable that has been previously defined in the logic block.
Read more in the Logic block values topic.
After you define the value type you define the value. If the value is a constant, you need to define the data type as either a number or a currency. If the value is a field, the data type is automatically populated.
If you want the calculated value to be rounded, you can choose one of the following rounding options:
- Round—rounds values to the nearest whole number. For example 1.5 pounds would round up to 2, and 1.4 would round down to 1.
- Round Up—rounds the value up to the nearest whole number. For example, 26.3 would round up to 27.
- Round Down—rounds the value down to the nearest whole number. For example, 26.6 would round down to 26.
If you do not select a rounding option, no rounding is applied to the calculated value.
Null values
Null values in math actions are treated as 0.
Math action input options
This topic reviews many of the available input combinations for the Math action in the Logic Builder.
The following table reviews some of the input combinations you can use in the Math action:
| Input Type 1 | Input Type 2 | Valid Sum Output Types | Valid Minus Outputs | Valid Multiply Outputs | Valid Divide Outputs |
|---|---|---|---|---|---|
| Currency | Currency | Currency, Number, Text | Currency, Number, Text | None | Number, Text |
| Currency | Date | None | None | None | None |
| Currency | Datetime | None | None | None | None |
| Currency | Number | Currency, Number, Text | Currency, Number, Text | Currency, Number, Text | Currency |
| Currency | Text | Currency, Number, Text | Currency, Number, Text | Currency, Number, Text | Currency, Number, Text |
| Currency | Time | None | None | None | None |
| Date | Date | None | Time, Number, Text | None | None |
| Date | Datetime | None | Datetime, Number, Text | None | None |
| Date | Number | Date, Number, Text | Date, Number, Text | None | None |
| Date | Text | Date, Number, Text | Date, Number, Text | None | None |
| Date | Time | Datetime, Number, Text | Datetime, Number, Text | None | None |
| Datetime | Datetime | None | Time, Number, Text | None | None |
| Datetime | Number | Datetime, Number, Text | Datetime, Number, Text | None | None |
| Datetime | Text | Datetime, Number, Text | Datetime, Number, Text | None | None |
| Datetime | Time | Datetime, Number, Text | Datetime, Number, Text | None | None |
| Number | Number | Time, Number, Text | Time, Number, Text | Time, Number, Text | Time, Number, Text |
| Number | Text | Time, Number, Text | Time, Number, Text | Time, Number, Text | Time, Number, Text |
| Number | Time | Time, Number, Text | Time, Number, Text | Time, Number, Text | Time, Number, Text |
| Text | Text | Time, Number, Text | Time, Number, Text | Time, Number, Text | Time, Number, Text |
| Text | Time | Time, Number, Text | Time, Number, Text | Time, Number, Text | Time, Number, Text |
| Time | Time | Time, Number, Text | Time, Number, Text | None | Time, Number, Text |
Math Expressions action
Use the Math Expressions action to build formulas of values, operators, and functions to use on specified records in a table. This action enables you to use multiple math operations in a single action.
Configuration
In the Expression Builder section, select the components of your formula with the drag and drop functionality. There are several components to select from, such as:
- Field—A field from a specified table, secondary table, or module setting.
- Constant—A user defined value. This can be a number or a currency value.
- Variable—A variable that has been previously defined in the logic block.
- + Add
- − Subtract
- × Multiply
- ÷ Divide
- ^ Raised to the power of (square root)
- ( ) Round brackets—Groups things together to specify the order of operations in the formula.
- i Imaginary Unit
- Σ Sum—The total amount of the values.
- ∣x∣ Absolute Value—Selects a field whose absolute value is used in the formula. Absolute values are always positive.
Once a value is selected, you can define the data source in the Formula Item Properties section. The result of the math equation is the output value.
Round action
Use the Round action to round the number found in a specified field based on the rounding rule selected.
There are several rounding rules to select from, such as:
Half Round Up—Rounds to the nearest whole number. Values with .5 or above as a decimal are rounded up.Round Away From Zero—Rounds up to the nearest whole number. A value of 1.1 would round up to 2.Round Towards Zero—Rounds down to the nearest whole number. A value of 1.9 would round down to 1.No Rounding—No rounding is applied.Half Round Down—Rounds to the nearest whole number. Values with .5 or below as a decimal are rounded down.