Show/Hide Toolbars

 PhraseExpander 5 Manual

Navigation: Designing templates > Macros > Data

Set contents

Scroll Prev Top Next More

interactive

This macro creates a new template in PhraseExpander (or updates its contents if it already exists).

You can also use the Set contents macro to store a piece of text inside a template (it can be a static piece of text or the contents of a variable) and reuse it (by using the insert template macro) when executing a template again.

 

This can be useful when you want to request a piece of information once, and then reusing it when executing more than one template (e.g. you can request the gender of a patient, save it into a template and then trigger other templates that will use that information, and therefore they will be automatically customized based on the gender of the patient).

 

To store a piece of information in a template

1.In the Design tab, click on Data > Set contents  
PhraseExpander will open the Set contents macro window with the selected text already selected

2.Make edits and click OK to insert the macro

The Set contents macro lets you store some text in a template for later use.

The Set contents macro lets you store some text in a template for later use.

 

You can customize the Set contents macro through the following options:

1.Template contents: the text that will be stored in the template

2.Id: the Id of the template that will be created or updated

3.Description: the description to be assigned to the template (only if a new template is created).

4.Abbreviation: the abbreviation to be assigned to the template (only if a new template is created).

5.Group name: the name of a glossary or group where the template will be saved (if the template doesn't already exist). If nothing is specified, PhraseExpander will create the template in the same group that contained the executed template.

 

IMPORTANT: if a template with the desired Id already exists in a different glossary or group from the one specified in Group name, PhraseExpander will update the existing template.

 

NOTE: if the target glossary is locked, PhraseExpander will not update it or create a new one.

 

Syntax

 

{#set contents -[id][desc][dest][abb]#}

 

contents: the data to be stored in the template contents.

 

[id]: the Id of the template. If the template with the specified Id doesn't exist, a new one is created in the group specified in [dest]

[desc]: (Description) sets the description of the template (applied ONLY if the template does not exist)

[abb]: (Abbreviation) set the abbreviation of the template (applied ONLY if the template does not exist)

[dest]: (Group name) the name of the glossary or group that contains the template (applied ONLY if the template does not exist and a new template is created). If not specified, PhraseExpander uses the group containing the template.

 

Example 1: storing the result of a variable

Template:

{#set {{gender}} -[desc=Current Gender][id=CURRENT-GENDER][dest=data]#}

 

Result:

creates a template (or updates the contents if already exists) that contains the value of the {{gender}} variable into the data glossary, sets the id of the template to CURRENT-GENDER and the description to Current Gender

Created with Help & Manual 7 and styled with Premium Pack Version 3 © by EC Software