How Do I Sort the Fields in a Microsoft Word Document?
To sort the fields in a Microsoft Word document created with the Microsoft Word activity, do the procedure in this topic.
Examples
- (Example) Create a Word Document and PDF File with Data from an App
- Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.
Prerequisites
- An access token for your
source and target
data source to store
the Microsoft Word template file and the output Word or PDF file.
For more information, refer to Access Tokens.
- How Do I Create Repeating Tables in a Document I Can Use with the Microsoft Word Activity?.
- A repeatable field in a Microsoft Word template.
Good to Know
- In most text fields, you can use process data variables as an alternative to literal data values.
How to Start
- Open Process Builder.
For information about how to open this screen, refer to Process Builder.
- In Process Builder, in the Activity Library, open the Document tab.
- On the Document tab, drag the Microsoft Word activity onto your process.
Procedure
- Complete the fields on the General Configuration screen.
- Click Source Configuration .
- On the Source Repository screen, select the source location of your Microsoft Word template file.
- Click Target Configuration .
- On the Target Repository screen, select the target location for your output Microsoft Word file.
- Click Microsoft Word Configuration .
- On the Microsoft Word Configuration screen, in the Word Template Name field, shows the name of the Word template file that is selected in the source repository.
- In the Destination File Name field, enter the file name of the output file.
You can use Process Data screen to specify a process data variable.
- To connect the process value to the Microsoft Word fields, do one of these:
- Click Basic Mapping.
A warning message shows that you will lose all the mappings in Advanced Mapping.
- To load all the Mail Merge fields, click Click to Load Word Fields.
- Drag your repeatable Microsoft Word fields to the Word Field list.
- In the Process Value column, enter the value to complete in the Word template.
You can use Process Data screen to specify a process data variable.
- Click Advanced Mapping.
A warning message shows that you will lose all the mappings in Basic Mapping.
- Click the Schema Mapping button to open the Schema Mapper.
- On the Schema Mapper, connect the AgilePoint process schema to the repeatable Microsoft Word field.
- Click Basic Mapping.
- Click Sort Configuration.
- Complete these fields.
Field Name Definition Word Field
- Function:
- Specifies the word field to sort in the Microsoft Word document or PDF document, generated as output.
- Accepted Values:
- The repeating fields from the Repeatable Word Fields box.
You can drag only 1 field from the Repeatable Word Fields box to sort the rows of a table. If the Word document has 2 or more tables with repeating rows, you can drag a field from each table to sort the field.
- Default Value:
- None
- Example:
- Refer to:
Sort by
- Function:
- Specifies whether to sort the fields in ascending or descending order.
- Accepted Values:
-
- Ascending - Sorts the fields in ascending order.
- Descending - Sorts the fields in descending order.
You can sort based on 1 field from each table. If the Word document has 2 or more tables with the repeating rows, you can sort a field from each table. Tables are identified by TableStart and TableEnd mail merge fields in Word.
- Default Value:
- Ascending.
- Example:
- Refer to: