Children
Takes two parameters, ChildTableName, Mode
Description:
The Attached Children Records will be added to the Query, using the specified mode. If more than one Parent Table exists in the Query, Child Records will be matched to any and all of the Parent Tables. So if you have 2 Parent Tables in the Query, the number of children would be doubled.
Mode must be one of: "All", "One", "Discard"
- "All": Every Child Record for Every pre-existing Record will be loaded. If more than one Child Records exists the pre-existing Record will be duplicated. If no Child records are found for a pre-existing Record, the Records will remain with blank fields values for the Child table.
This is the default mode when this optional parameter is omitted.
- "One": Only One Child Record for Every pre-existing Record will be loaded. If more than one Child Records exist the pre-existing Record a single Child will be chosen at random. If no Child records are found
for a pre-existing Record, the Records will remain with empty fields values for the Child table.
- "Discard": Every Child Record for Every pre-existing Record will be loaded. If more than one Child Records exists the pre-existing Record will be duplicated. If no Child records are found for a pre-existing Record, the Records will be removed from the Query. Note that this is the typical behavior for SQL.
Examples:
SetNew "MemTab.Person.Alias", ($SessionUser)
Children "ToDo.List"
Children "ToDo.Item"
KeepIf "ToDo.Item.Alias", =, `pItem