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.

Figure: Microsoft Word Configuration screen

Microsoft Word Configuration screen
Figure: Sort Configuration screen

Sort Configuration screen

Prerequisites

Good to Know

How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, in the Activity Library, open the Document Document icon tab.
      2. On the Document Document icon tab, drag the Microsoft Word Microsoft Word icon activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.

Procedure

  1. Complete the fields on the General Configuration screen.

    For more information, refer to Configure General Options for a System Activity.

  2. Click Source Configuration Source Configuration icon.
  3. On the Source Repository screen, select the source location of your Microsoft Word template file.
  4. Click Target Configuration Target Configuration icon.
  5. On the Target Repository screen, select the target location for your output Microsoft Word file.
  6. Click Microsoft Word Configuration Microsoft Word Configuration icon.
  7. 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.
  8. 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.

  9. 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.

      1. To load all the Mail Merge fields, click Click to Load Word Fields.
      2. Drag your repeatable Microsoft Word fields to the Word Field list.
      3. 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.

      1. Click the Schema Mapping Schema Mapping icon button to open the Schema Mapper.
      2. On the Schema Mapper, connect the AgilePoint schema to the repeatable Microsoft Word field.
  10. Click Sort Configuration.
  11. 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: