[Pull] List of Fields from another Query

Takes three parameters, QueryName, FieldBase, FieldNames

Usage:

QueryName, FieldBase, FieldNames
QueryName, [""], FieldNames
QueryName, [WorkWith], FieldNames
["Request"], [""], FieldNames

Description:

The [Pull] command (for the Top Query) will take a list of space separated Field names that we want to Ensure in our current Top Query, and then copy those Field values from the Source Query if they exist, and set them to blank if they do not exist.

If a Source Query is not specified, the Source Query will be the Request Query.

Inside a TopWith block:
If the [Pull] command's FieldBase parameter is used, the TopWith name scope will be used for the Destination.
If the [Pull] command's FieldBase parameter is left blank, the TopWith name scope will be used for only the Source Query.

It is acceptable for the Field Base of the Source Fields and Destination Fields to not match; they will be transposed from the Source Field Base to the Destination Field Base.

An equivalent command with a destination of the Work Query is Pull, without the Top Query syntax of the surrounding [ ]. It will instead default to pulling from the current Top Query, not the Request Query.

Note:

One of the most common things done in user interface code is fetch from the Request Query a set of possible input parameters that each may or may not exist into the Top Query to take action with.

(We don't want to just work in the Request Query because it complicates securing an app because you are working in the same memory space an attacker has access to. So, we need to copy only select values into an otherwise clean Query.)

Examples:

[Pull] "Request", "ToDo.List.", "Name DueDate" 'TQ Fields: Name DueDate

[Pull] "Request", "Name DueDate" 'TQ Fields: Name DueDate

[Pull] "Me.Output", "ToDo.List.Name ToDo.Item.Name" 'TQ Fields: ToDo.List.Name ToDo.Item.Name (Pulls from Work Query)

[Pull] "ToDo.List.Name ToDo.Item.Name" 'TQ Fields: ToDo.List.Name ToDo.Item.Name (Pulls from Request Query)

TopWith "ToDo.List"
[Pull] "Request", "ToDo.List.", "Name DueDate" 'TQ Fields: ToDo.List.Name ToDo.List.DueDate
End TopWith

TopWith "ToDo.List"
[Pull] "Request", "Name DueDate" 'TQ Fields: ToDo.List.Name ToDo.List.DueDate
End TopWith

TopWith "ToDo.List"
[Pull] "Name DueDate" 'TQ Fields: ToDo.List.Name ToDo.List.DueDate
End TopWith