MetaData - Processing Rules - String Management
From All n One's bxp software Wixi
Contents
1 Overview
For more information on
| Area | Link |
|---|---|
| MetaData please refer here | MetaData_-_Start_Here |
| Processing rules please refer here | MetaData_Process_Rules |
| Parameter construction please refer here | MetaData_Program_and_Outcomes |
2 Reference
This wixi article is meant to serve as a reference guide to a subset of MetaData Processing Rules.
3 Rules
3.1 Append
The append rule allows for any string to be appended to the end of an existing string stored in a Database field.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to append the new string to
- New string to append
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]]String to append[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
Append[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]]Add This String To The End[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.2 Prepend
The prepend rule allows for any string to be appended to the start of an existing string stored in a Database field.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to prepend the new string to
- New string to append
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]]String to prepend[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
Prepend[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]]Add This String To The Start[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.3 Encapsulate
The encapsulate rule allows for any string to be to be added to and surround the contents of an existing string stored in a Database field.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to encapsulate the new string with
- New string to append
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]]String to encapsulate[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
Encapsulate[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]]Surround With This[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.4 Remove Numbers
The remove numbers rule simply removes all numbers from the contents of an existing string stored in a Database field.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to remove number from
- New string to append
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]] [[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
RemoveNumbers[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.5 Strip Tags
The strip tags rule simply removes all HTML tags ( <br/>, <b>, <table>, </table>
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to remove HTML tags from
- New string to append
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
StripTags[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.6 Replace
The replace rule simply allows for the replacement of a string with another from the contents of an existing string stored in a Database field.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Field that contains the string to attempt the replacement on
- Value to search for
- Value to replace with
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Filed containing live value[[-SEP-]]Field to attempt replacement on[[-SEP-]]Value to search for[[-SEP-]]Value to Replace with[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
Replace[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]] strCDA_1_field_0_3[[-SEP-]]Find This[[-SEP-]]Replace With This[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.7 Concatenation
The concatenation rule simply allows for the combining of the contents of one database field with another within the same record of the same database
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Form id (the same as the current sequence)
- First field to be concatenated
- Form id (the same as the current sequence)
- Spacer (string to separate the two fields)
- Form id (the same as the current sequence)
- Second filed to be concatenated
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination Field[[-SEP-]]Form Id[[-SEP-]]First Field[[-SEP-]][[-SEP-]]Form Id[[-SEP-]][[-SEP-]]Spacer[[-SEP-]]Form Id[[-SEP-]]Second Field[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
Concat[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]]1[[-SEP-]][[-SEP-]] - [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_3[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.8 Read From
The read from rule simply allows for the for the searching of a string for a search sting and if found remove every character before and including the search string
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Form id (the same as the current sequence)
- Field to perform the searching on
- Value to search with
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form ID[[-SEP-]]Field To Search [[-SEP-]]Value To Search For[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
ReadFrom[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_428_field_0_2[[-SEP-]]Find This[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.9 Read Until
The read until rule simply allows for the for the searching of a string for a search sting and if found remove every character after and including the search string
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Form id (the same as the current sequence)
- Field to perform the searching on
- Value to search with
Example:
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form ID[[-SEP-]]Field To Search [[-SEP-]]Value To Search For[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
ReadUntil[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_428_field_0_2[[-SEP-]]Find This[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
3.10 Set Value
The set value rule simply allows for a database field to be updated with a new string, defined in the MetaData Program.
Required fields to execute rule:
- Rule Name
- Form id (the same as the current sequence)
- Field to store the end result
- Form id (the same as the current sequence)
- Value to insert
Example:
Rule Name[[-SEP-]]Form ID[[-SEP-]]Destination Field[[-SEP-]]Form Id[[-SEP-]][[-SEP-]]Value To Insert[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
Example (with replacement values):
SetValue[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]][[-SEP-]]Add This Value[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]