ConditionalSet
This function set values of specified column in specified table for every row that satisfies specified condtion.
Syntax
ConditionalSet("target","fieldName","conditionalFieldName","conditionalValue","newValue");
Function arguments
- target – (String) Name of the target table. This can be nested table aswell (i.e. 'table1>table2′)
- fieldName – (String) The name of the field/column which’s value is to be set.
- conditionalFieldName – (String) The name of the field containing value to be tested as condition
- conditionalValue – (String) The value that conditional field value has to be equal to in order to satisfy condition
- newValue – (String) The value to be set for target field in every row that satisfies condition.
Return value
This function returns Boolean.
Returns true on success, false if operation failed for any field.
Examples
Example 1:
This will set value of 'column1′ in 'table1′ equal to 'some new value’ for every row that satisfies condition – 'column3′ value is equal to '5′.
ConditionalSet("table1","column1","column3","5","some new value");