Insert Phrase

Top  Previous  Next

Inserts the content of a phrase into another phrase. This allows to reuse the same text in many phrases.

This works with both plain and formatted phrases (although with Formatted phrases the 'Select manually from list' option will not be available).

 

You can identify the phrase you want to insert by description or abbreviation.

When you type the item to search, PhraseExpander will display a list of phrases that match your query.

 

The Insert phrase dialog

The Insert phrase dialog

 

 

Description

Identify phrase to insert by: tells how you want to locate the phrase to insert. You can choose the description or the abbreviation of the phrase. PhraseExpander will display the results that match your query.

If more matches are found: tells how PhraseExpander should behave if more than one match is found.

Select manually from list: PhraseExpander will display all the results found and you can select the most appropriate one

Select element: PhraseExpander automatically uses a specific element

Random selection: PhraseExpander takes a random element from the list

 

NOTE: to choose a phrase by description, you need to have explicitly assigned a description to the phrase.

Syntax

 

{#insert phraseid -[key][multiple]#}

phraseid: can be the description or the abbreviation of a phrase, glossary or group

[key]: 

 hint - match all the phrases whose description is equal to phraseid

 short - match all the phrases whose abbreviation is equal to phraseid

[multiple]: 

select - shows a list of all the phrases that match the criteria for selection. If only one item is present, it's automatically selected

 n - select the n-'th element in the list (n between 1 and 99): elements are displayed in alphabetical order by description

 random - choose a phrase in the list at random

 

Example

Phrase:

{#insert Op Reports -[key=hint][multiple=select]#}

 

Result:

looks for a phrase/glossary/group whose description is "Op Reports", and adds its contents into the phrase. If multiple items with the same description are present, a list is shown.

 

Phrase:

{#insert Op Reports -[key=hint][multiple=random]#}

 

Result:

looks for a phrase/glossary/group whose description is "Op Reports", and adds its contents into the phrase. If multiple items with the same description are present, takes one at random.

 

NOTE: when the phrase that contains an Insert Phrase macro contains also an InputForm macro (to display all the Manual Inputs in a single form), all Insert Phrase macros are preprocessed when the phrase is executed: this will cause all the Manual Inputs to be displayed first, as the command is executed. This feature is useful to define standard pieces of text that you want to reuse multiple times (when pre-processing is active, the select option will always select the first item in the list).

If you don't want the Insert Phrase macros to be pre-processed, you can check the Do not pre-process 'Insert Phrase' macros in the Input Form macro.