KeepFields

Takes two parameters, FieldBase, FieldNamesList

Description:
The specified Fields will be reorganized into the new order and all others will be discarded.

Example:

In the first example below, we are keeping the Work Query fields "FirstName", "LastName", "Age", and "DateJoined" from the "MemTab.Person" record with the alias pAlias.

In the second example below, we first set our Work Query field "MemTab.Person.Alias" to to the alias of the the SessionUser. We then get the record for that alias and use the Children command to get its roles. Lastly, we keep the Work Query fields "FirstName and "LastName" from the table "MemTab.Person" and "Type" from the table "MemTab.Group", which is "MemTab.Person" record's child table.

LoadRecord "MemTab.Person.Alias", pAlias
KeepFields "MemTab.Person.", "FirstName LastName Age DateJoined"

HtmlTable


SetNew "MemTab.Person.Alias", ("`" & $SessionUser)
Get "MemTab.Person"
Children "MemTab.Group"

KeepFields "MemTab.Person.FirstName MemTab.Person.LastName MemTab.Group.Type"

HtmlTable