Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating a Map Structured rule

Updated on November 23, 2022

To define the relationships between a set of properties and a single structured text value, create a Map Structured rule.

When used with the Map Structured method, the system uses information on the Mapping tab to assemble (From Clipboard) or disassemble (To Clipboard) a structured text value. The information on this tab does not determine the processing direction.
  1. In the header of Dev Studio, click CreateIntegration-MappingMap Structured.
  2. On the Map Structured Record Configuration page, in the Label field, enter an identifier for this rule.
  3. In the Context section, in the Apply to field, select the class to which this rule applies.
  4. Click Create and open.
    Result: The Map Structured rule form opens on the Mapping tab.
  5. On the Mapping tab, in the Settings section, in the Character encoding field, select an option to control the character set used in the output structure when you use this rule in the From Clipboard direction to write to an output file.
    Select Default to use the character set of your Pega Platform server, or another character set such as ASCII, Windows Latin-1, or UTF-8.

    Character conversion from the internal character set of your Pega Platform server to the encoding you specify in this field occurs only when you use this rule with the Connect-File method; the Map-Structured method ignores this field.

    Character conversion uses standard Java methods; in some cases two-byte characters may be converted to single-byte output characters.

  6. In the Justification field, select Left or Right to control the justification of data within the field when the field length is longer than the data and you use this rule in the From Clipboard direction to assemble structure.
    For example: When you specify Left, padding only occurs in remaining character positions (if any) after the end.
  7. In the Default pad character field, indicate the type of character you want to use to pad your data when you use this rule in the From Clipboard direction to assemble a structure.
    When you use a map structured rule in the To Clipboard direction to disassemble a structure, no padding occurs.
    • If you want to pad your data with spaces, select Space.
    • If you want to pad your data with another type of character, select Other.
  8. If you select Other in step 7, in the Specify pad character field, enter a single character that you want to use to pad your data.
    Note: You can override this choice at the individual field level. You cannot enter an octal, decimal, or hex representation of a character in this field.
  9. In the Map format field, identify the size and position of each field in the data structure.
    When you save the Map Structured form, the system validates that no fields are overlapping, and presents a warning if there are gaps (unmapped character positions) between fields.
    1. In the Offset field, enter a number for the character offset from the beginning of the structure for the first character position of this field.
      The first character of the structure starts at offset 0.
    2. In the Length field, enter a number for the length in characters.
      At run time, when this rule is used in the From Clipboard direction, the system truncates data values longer than this length, and pads data values shorter than this length.
    3. In the Property field, enter a property reference. To reference a property on the page corresponding to the Applies To key part, enter a period and the property reference. Use the notation pagename.propertyname to reference a property on another page, and include that page name on the Pages & Classes tab.
      As a best practice, enter only properties that have a character-oriented type, such as Text, Date, DateTime, Identifier, Time of Day, or Decimal. Do not use Double, TrueFalse, Integer, or Password properties.

      You can also enter a string constant, by surrounding the text with quotation marks, or an expression. String constants and expressions are used to construct a string when the Map From Property to Clipboard direction is selected in the Map-Structured method.

      For more information about expressions, see About Expressions.

    4. To control padding when you use this rule in the From Clipboard direction to assemble a structure, in the Pad character field, enter a character value. Leave this field blank to use the pad character specified as the default.
      Note: You cannot use an octal, decimal, or hex representation of a character in this field.
    5. To control justification of the value within the structured value when you use this rule in the From Clipboard direction, in the Justification field, choose Default to use the value in the Justification field in the Settings section, tor Left or Right.
  10. Click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us