Introduction
Value Builder Rules allow users to define a set of transform operations to perform on a dataset to build an output value. Examples include parsing a subset of a text value, or concatenating several text values together.
Operations may be used to immediately append text to the final output 'Value', or to apply transforms to text contained within a temporary 'Working Value' buffer.
Rules are executed in order, and each rule type may have additional type-specific additional parameters. Rule types are detailed with examples below.
When all rules have been processed, any data that remains in the 'Working Value' buffer will be automatically appended to the output 'Value'.
Append Static Value
Immediately appends static text to 'Value' and clears the 'Working Value' buffer.
Parameters
Text - the static text to append
Example
Rule Type | Value | Working Value |
Append Static Value
| "Value1" | |
Append Static Value
| "Value1Value2" |
Append Dynamic Value
Immediately reads and appends dynamic text to 'Value' and clears the 'Working Value' buffer.
Parameters
Source Value Key - key of the dynamic value to append
Continue If Blank - defaults to true - indicates whether processing of subsequent rules should continue if the value read is blank
Continue If Not Blank - defaults to false - indicates whether processing if subsequent rules should continue if the value read is not blank. For example, if set to false, can be used to configure "fallback" values where the only the first value with data is taken
Example
Sample Data
Key1: Value1Key2: Value2
Rule Type | Value | Working Value |
Append Dynamic Value
| "Value1" | |
Append Static Value
| "Value1-" | |
Append Dynamic Value
| "Value1-Value2" |
Read Dynamic Value
Reads dynamic text into the 'Working Value' buffer. Use this operation when you intend to manipulate the text before committing it to the output 'Value' using the 'Append Working Value' rule type.
Parameters
Source Value Key - key of the dynamic value to append
Continue If Blank - defaults to false - indicates whether processing of subsequent rules should continue if the value read is blank
Example
Sample Data
Key1: Value1Key2: Value2Key3: Value3
Rule Type | Value | Working Value |
Append Dynamic Value
| "Value1" | |
Read Dynamic Value
| "Value1" (note this is unchanged) | "Value2" |
Convert To Uppercase | "Value1" (note this is unchanged) | "VALUE2" |
Append Working Value
| "Value1-VALUE2-" | |
Append Dynamic Value
| "Value1-VALUE2-Value3" |
Append Working Value
Appends the text contained in the 'Working Value' buffer to the output 'Value' and clears the 'Working Value' buffer.
Parameters
Prefix - static text to append before the 'Working Value'
Suffix - static text to append after the 'Working Value'
Example
See the example for Read Dynamic Value above
Convert to Uppercase
Converts the text contained in the 'Working Value' buffer to uppercase.
Example
See the example for Read Dynamic Value above
Replace Text
Replaces all occurrences of a specified text string with another text string in the 'Working Value' buffer.
Parameters
Source Text - text to replace
Replacement Text - text to substitute in place of Source Text
Example
Sample Data
Key1: Value1Key2: Value2Key3: Value3
Rule Type | Value | Working Value |
Read Dynamic Value
| "Value2" | |
Replace Text
| "Value9001" | |
Append Working Value | "Value9001" |
Regex Match
Searches for regular expression matches in the 'Working Value' buffer text. Online tools such as https://regex101.com/r/hT2lW8/2 can be used to help construct and test regular expressions.
Parameters
Regex Pattern - the regular expression pattern to match
Match Index - allows the user to specify which match to take if multiple matches are found
Group Index - a regular expression pattern can include subexpressions, which are defined by enclosing a portion of the regular expression pattern in parentheses. Every such subexpression forms a group. If the regular expression engine can find a match, the first group (at Group Index 1) contains a string that matches the entire regular expression pattern. Each subsequent element, from Group Index 2 upward, represents a captured group.
Continue If No Match - defaults to false - indicates whether processing of subsequent rules should continue if no match is found
Clear If No Match - defaults to false - clear the 'Working Value' buffer if no match is found
Example
Sample Data
Key1: 100mm-200mm-300mmm
Rule Type | Value | Working Value |
Read Dynamic Value
| "100mm-200mm-300mmm" | |
Regex Match
| "200mm" | |
Append Working Value | "200mm" |
Convert to Hex
Converts the text contained in the 'Working Value' buffer to hexadecimal format. For example, this rule can be used if case sensitivity is required for Construction Component lookup key generation.
Example
Sample Data
Key1: 1UXr8Z0048iJ4rE3KvCpKu
Rule Type | Value | Working Value |
Read Dynamic Value
| "1UXr8Z0048iJ4rE3KvCpKu" | |
Convert To Hex | "31555872385A30303438694A347245334B7643704B75" | |
Append Working Value | "31555872385A30303438694A347245334B7643704B75" |
Evaluate Expression
Evaluates a mathematical expression or formula.
Parameters
Expression Text - an expression pattern with data attributes enclosed in brackets. Supported expressions are documented by mXparser.
Example
Sample Data
LengthMeters: 2.3
Rule Type | Value | Working Value |
Evaluate Expression
| "2300" | |
Append Working Value
| "2300 mm" |
![O3 Solutions [Test] Help Center](https://downloads.intercomcdn.com/i/o/494610/c7673691aaf9ad5fa3d4b92e/920cc346e5bc700695f8563d6a7e929b.png)