CheckSubFields
Determines whether the values of the specified child fields meet the specified criteria and deletes the parent field if they do not.
Syntax
bool CheckSubFields (StrParam)
Parameters
An expression that specifies which LINEITEM child fields are to be checked for the presence or absence of captured values. Within the expression, the name of each child Field object must be surrounded with single quotation marks ('). You can also use parentheses () in your expression. Action is placed on the parent of the LINEITEM field.Smart parameters are supported.
Returns
Always True.Level
Field level.Details
Validates an instance of a parent Field object by confirming the presence (or absence) of captured values for one or more of its child fields. (In the Invoices application, as an example, child fields of the LINEITEM parent include: ItemID, ItemDesc, Quantity, Price and LineTotal.)Invalid parent Field objects are deleted if they do not meet this criteria.
This action usually runs in its own RuleSet (for example, in a Filter RuleSet) and would be applied to the DETAILS Field object (parent object to the LINEITEM field) in the Invoices example.
- Example 1
Example 1: The captured values for a LINEITEM field are: ItemID = 12345 ItemDesc = Price = 12.00 LineTotal = The action's parameter contains this expression: CheckSubFields("('ItemID' OR 'ItemDesc') AND ('Price' OR 'LineTotal')")In this example the action returns True and the current LINEITEM object is Valid.
- Example 2
The captured values for the LINEITEM field are: ItemID = 12345 ItemDesc = Thank you for your order Price = LineTotal = The action's parameter contains this expression: CheckSubFields("('ItemID' OR 'ItemDesc') AND ('Price' OR 'LineTotal')")In this example the action's equation returns is False and the current LINEITEM object is Invalid. The field and the values of its child fields are deleted from the Data file.
- Example 3
The captured values for the LINEITEM field are: ItemID = 12345 LineTotal = gonetolunch The action's parameter contains this expression: CheckSubFields("('ItemID') AND ('LineTotal')")In this example, the action returns True and validates the LINEITEM field, despite the presence of a nonsense entry in the LineTotal child field.