About this article
This article explains how you can use a dropdown field and a data source to insert different values in a document by selecting one option from the dropdown.
Prerequisites
|
Example Word
In this example we use a dropdown field to select the gender of a contact person. Based on the selected option 'Male' or 'Female', the variables mr/mrs, he/she, him/her and his/her will be shown in the document.
The first step is to create a data source 'Gender' with the schema fields MrMrs, HeShe, HimHer and HisHer. In this data source we add two items with the Name 'Male' or 'Female'. The data source with the items looks like this:
The second step is to create a document with at least one dropdown field by following the instructions below:
- In Word open a new document, then in Template Designer click
+ Create template
.
- In the Template Designer, navigate to the Form tab and click
+ Add question
, then in theType
field selectDropdown
.
- Enter the Question title 'Gender'.
- Select the Data source 'Gender'.
- Select the Label column 'Name'.
- Click
Add to form
.
The dropdown properties look like this:
The last step is to insert the different values in the document by following the instructions below:
- In the Template Designer, navigate to the Template tab.
- Select the location where the smart field should be inserted.
- Click
Add smart field
.
This step doesn't apply if you are adding the very first smart field in the template.
- Click
Form responses
.
Select 'Gender' and expand this form to show all the variables. Select the variable you want to insert, e.g. 'HeShe'.
- Click
Add to template
.
- Repeat steps 2 to 5 to insert all the values of the 'Gender' data source you want to insert in your document. When you are done, the document looks like this:
When creating a document a user can select the gender from the dropdown. The document will show the values for the selected option. The result looks like this:
Related articles
Comments
0 comments
Article is closed for comments.