Some Work Query command parameters can accept a source of either a Work Query Field name or a text literal. Text literals in these cases are prefixed with a backtick ` character.
These commands take the source parameter value as a string, and that string could contain any one of the following:
What you pass to this parameter can come from a text literal in double quotes, or it could come from a Top Query field name (with or without a leading ` to be prepended), or it could come from an expression that is solved in the context of the Top Query .
The complete list of possibilities includes:
The backtick is only applicable when a MOX command is:
Most MOX commands don’t use the backtick, but the Build, Text, and most variations of Set that do use them are commonly used themselves. The complete list of commands that use this syntax are:
Command | Parameters Used |
Build | Each Source |
Files | Destination, Source |
Folders | Destination, Source |
Images | Destination, Source, Value |
KeepIf | Left, Right |
LookUp | Table, Alias, Field |
Num | Source, Value |
Offset | Offset, Value |
Parse | Source, Delimiter, Value |
SendEmail | From, To, Subject, AttachPath, AttachName, Body |
Set | Source |
SetEnsure | Source |
SetFirst | Source |
SetIf | Source, Left, Right |
SetIfAll | Source |
SetIfAny | Source |
SetLast | Source |
SetNew | Source |
Text | Source, Value |
Example
This is a comprehensive example for demonstration of syntax only. What it does is not something that should be deemed useful or typical as-is
Rem 'Routing [Pull] FieldName Backtick.Start FieldName EndRem Method Backtick.Start(pFieldName) Rem 'Get our data LoadRecord "MemTab.Person", ($SessionUser) EndRem Rem 'Demonstrate Backtick usage If pFieldName Build "MemTab.Person.", _ 'Field Base pFieldName, _ 'Destination. Top Query Field contains a Work Query Field Name " `pFieldName, _ 'Top Query Field used as plain text "'>", _ 'Plain text, starting < "A" "`Test with ", _ 'Plain text escaped with ` pFieldName, _ 'Top Query Field contains a Work Query Field Name " in ", _ 'Plain text, starting < "A" `pFieldName, _ 'Top Query Field used as plain text "", _ 'Plain text, starting < "A" pFieldName 'IfLenFld (If Length Bool Test Field) from Top Query NewFields "MemTab.Person.", _ 'Field Base (pFieldName & ".Build") 'Expression in Top Query for Work Query Field Name [New] EgFBase = "MemTab.Person" Build (EgFBase & "."), _ 'Field Base created via Top Query Expression (pFieldName & ".Build"), _ 'Expression in Top Query for Work Query Field Name `($SessionName & ": "), _ 'Expression in Top Query for plain text result "Email", _ 'Work Query Field Name pFieldName 'IfLenFld (If Length Bool Test Field) from Top Query Else Html "Test with FirstName value in FirstName" End If EndRem Rem 'Put it on the page HtmlTable EndRem End Method