Dataset values in custom input fields for your Outlook emails
In this article
In Shared Email Templates for Microsoft Outlook, you can create custom input fields connected to datasets by using the WhatToEnter (WTE) macro.
How to add a field for selecting values from a dataset #
Start creating or editing your template.
Decide where in the template you want to insert a field for selecting a dataset value, place the cursor there, and then select the
Insert macro button on the template editor toolbar.Select What to enter.
In the What to enter dialog, on the General tab, select Dataset, enter the field name (this name appears in the pop-up dialog prompting you to select a dataset value), and choose the dataset and the column you want to use.

- With the
Insert nested macro button, you can open a list of macros that can be nested and select the one you need. - If you select a file column, the Attach file checkbox appears. Select it if you want to attach the file to the email.
- If you select a picture column, the Insert picture checkbox appears. Select it if you want to insert the picture into the email.
- If you want to select multiple dataset values when inserting your template into an email message, select the User can select multiple items checkbox. Enter a separator that will divide the inserted values.
- The
icon means that HTML is supported, so you can enter HTML code. - With the Required checkbox selected by default, the template won’t be inserted into an email message without the dataset value.
If you switch to the Advanced tab, you can specify:
- What value to insert into your email message if the result returned by the WhatToEnter macro is not empty.
- What value to insert into your email message if the result returned by the WhatToEnter macro is empty.
- What regular expression the value that will be entered or selected via the pop-up dialog must match.
When you’re done, select OK.
- With the
The field for selecting a value from the specified dataset appears in your template. Select Save.

When you insert the template into an email message, a pop-up dialog appears prompting you to select a value from the key column of the specified dataset.

When you select the key value and click OK, the value from the specified column will be inserted into the email message.
How to customize the WhatToEnter macro output #
When inserting the WhatToEnter macro into your template, you can specify what text string to use in an email message depending on whether the result returned by the macro is empty or not.
In the What to enter dialog (after you’re done with the macro parameters on the General tab), switch to the Advanced tab.
Under Return if result is not empty, enter the text string that you want to be automatically inserted into an email message along with the macro result. In the text string, use [Result] as a placeholder for the macro result (as many times as you need).
Under Return if result is empty, enter the text string that you want to be automatically inserted into an email message if the macro returns an empty result.

Select OK.
Save the template.