Setting a Specific Document Date
About Setting a Specific Document Date
When you upload data, the documents may contain several date fields, or none at all. In any case, you need to pick or create a date field to use as the Document Date. XM Discover uses the Document Date field as the primary date in reports, trends, alerts, and so on.
On this page you will learn to add a custom field to your documents and set it as Document Date.
Setting a Specific Document Date
- Create a job using the connector of your choice.
- Follow the job setup until you reach the mapping step titled “Map Desired Fields into XM Discover.”
- Scroll down to the bottom of the Source Mapping section.
- By default, there is an empty field mapping at the very bottom titled Custom Field. If you do not see one, click the plus icon to the right of the lowest mapping to add it.
- Provide the following information for the custom field.
- Field Name: Provide the name for the field (for example, custom_date).
- Data Type: Select Date Attribute from the dropdown menu.
- Attribute Name: Leave it the same as “Field Name” (for example, custom_date).
- Attribute Display Name: Leave it the same as “Field Name” (for example, custom_date).
- Reportable: Select this checkbox.
- Scroll up to the Default Source Mapping section.
- Select the attribute you created earlier for the Document Date mapping (for example, custom_date).
- Click the gear icon in the Transformations column.
- In the Transform: field name window, select Custom Transformation from the drop-down menu.
- In the expression builder, you have several options to set a date. Choose the one that suits you best:
Qtip: In both cases, the resulting date will use the YYYY-MM-DDThh:mm:ssZ format.
- Use load time: To set the custom field to the date when the documents are uploaded into XM Discover, drag the NOW() function from the Functions section onto the Expression.
- Use hardcoded value: To set the custom field to a specific date, drag the TEXTTODATE() function from the Functions section onto the Expression box and provide the date and the date format inside the parenthesis.
- Use load time: To set the custom field to the date when the documents are uploaded into XM Discover, drag the NOW() function from the Functions section onto the Expression.
- Click the Test button to see the result of the transformation displayed in the box next to the “Test” button.
- Click Save to save the transformation.
- Continue with the setup to upload data.