Navigation: Templates > Template Language Reference > Complete Alpha Listing >====== #WHERE (define #CODE embed point availability) ====== | |
#WHERE( embeds )
#WHERE | Limits the availability of a #CODE to only those specific embedded source code points where the generated code would be appropriate. |
embeds | A comma-delimited list of #EMBED identifiers that specifies the embedded source code points that may use the #CODE to generate source code. |
The #WHERE statement limits the availability of a #CODE to only those #EMBED embedded source code points where the generated code would be appropriate. A single #CODE may contain multiple #WHERE statements to explicitly define all the valid #EMBED embedded source code points. All the #WHERE statements in a #CODE are evaluated to determine which embedded source code points have been specifically enabled.
The embeds list must contain individual #EMBED identifiers delimited by commas. It may also contain ranges of embed points in the form FirstIdentifier..LastIdentifier, also delimited by commas. The embeds list may contain both types in a “mix and match” manner to define all suitable embedded source code points.
Example:
#CODE(ChangeProperty,'Change control property')
#WHERE(%AfterWindowOpening..%CustomRoutines) #!Appropriate everywhere after window open
#PROMPT('Control to change',CONTROL),%MyField,REQ
#PROMPT('Property to change',@S20),%MyProperty,REQ
#PROMPT('New Value',@S20),%MyValue,REQ
%MyField{%MyProperty} = '%'MyValue