SetIf

Takes six parameters, FieldBase, Destination, Source, Left, Comparison, Right

Description:

Copy the value of Source to the Destination Field only if the criteria is True.

If the Source is set to "Bool" then it will assign a value of "y" to the Destination Field if the criteria is True, otherwise it will clear the Destination.

If Comparison is empty, then Right must also be empty. In this mode a simple bool test is done on Left, and if the contents of the Field has any length then it will evaluate to true. Alternatively, if the word Not is placed in front of the Left field, followed by a space (eg. "Not MyTest") then it will evaluate to true when the contents of the Field are empty.

Usage:

FieldBase, Destination, Source, Left, Comparision, Right
FieldBase, Destination, Source, Left, [""], [""]
[WorkWith], Destination, Source, Left, Comparision, Right
[WorkWith], Destination, Source, Left, [""], [""]

List of Comparisons:

 Example:

SetIf   "MemTab.Person.", "Firstname", "`William", "Firstname", "=", "Bill"

SetIf   "MemTab.Person.", "IsBill", "Bool", "Firstname", "=", "Bill"