Add custom text blocks

This document defines custom text blocks.

Custom text blocks are used as additional information for a printer file that can be connected in an XML structure. This can be connected in 'XML Structure. Open Section' (CMS007) through 24='Add custom text block'. Prior to using the custom text block, these programs must be set up:
Note: Adding new sections can have a large impact on output function performance. Also, this functionality applies only for printer file type 1- Document.

A. 'XML Text Key Group. Open' (CMS034)

This program defines the key groups. Key groups are unique records with a length of 36 characters. Each key group can contain four key fields. Fields from 'Table Fields. Open' (MNS121) can be used as key fields. These key fields are used in (CMS038).
Note: You cannot use CONO field as a key field.
Follow these steps to create a key group:
  1. Start (CMS034).
  2. Specify the key group name. Use option 1='Create'.
  3. On the E panel, specify the description. This can also be defined per language by clicking the Language button.
  4. Specify up to four key fields. These key fields indicate a field from an M3 table.
  5. Press Enter.

B. 'XML Custom Text. Open' (CMS036)

This program defines the text identities which contain the text block shown in the XML structure. Text identities can be in combination with:
  • Text identity and language
  • Text identity

    Single division used (SNDI) field for (CMS036) that is activated.

Fields to consider on (CMS036/B):
  • Text identity - indicates the Text ID. Text ID is assigned to multiple start date and languages.
  • Start date - indicates the date when the Text ID is available for use.
  • Language - indicates the language that is used to match in the 'XML Document language' field. Language is the priority for consideration when matching a text identity record to be displayed in the XML structure.
Note: Both combinations are irrespective of the start date. When any of the text identity combinations do not contain valid start date or is already past the finish date, the text block is not generated.
Fields to consider on (CMS036/E):
  • Description - describes the text identity and can be translated in different languages through the Language button.
  • Finished date - indicates the last valid date of the record.
  • Text type - indicates the text type in the XML structure.
  • Text place - indicates the subtype of the text: 1-Pre Text or 2-Post Text.
  • Label - indicates the label of the text block. Labels can be classified as (1) Message ID (2) Text. Label text can be translated to different languages through the Language button.
  • Text - A text browser where the user must provide an information. When left blank, the text block in XML structure is not shown even if criteria are met.

Follow these steps to create a text identity:

  1. Start 'XML Custom Text. Open' (CMS036).
  2. In the 'Text identity' field, specify the text ID which can be assigned to multiple start dates to determine its validity. It is connected to a key group in (CMS038).
  3. In the 'Start date' field, specify from which date the text is valid.
  4. In the 'Language' field, specify the language from which external documents are to be printed.
  5. Use option 1='Create'.
  6. On the E panel, specify the description which can also be defined per language by clicking the Language button.
  7. In the 'Finish date' field, specify the last valid date of the record.
  8. In the 'Text type' field, specify the text type to include in the XML file.
  9. In the 'Text place' field, specify the subtype of the text.

    Alternatives for the text place:

    • 1='Before' which means that the subtype of the text is 'Pre-text'
    • 2='After' which means that the subtype of the text is 'Post-text'.
  10. Specify the label by either specifying a message ID or a text. If specifying a message ID, the label is automatically displayed in the end user's M3 language. If specifying a text, it can also be defined per language by pressing the Language button.
  11. Press Enter.
  12. On the M3 Text window, specify the text. This text indicates the text block that is displayed in the XML file. The 'Text block' and 'Language' fields must be empty, otherwise an error that it is invalid occurs.
  13. Press Enter.
    Note: You can create multiple Text IDs with the same name, only if the start dates are different from each other. You can create multiple text IDs with the same name and start date, only if languages are different. The custom text block to be used is the one that match the language trigger.

C. 'XML Custom Text. Open Key Field' (CMS038)

This program defines the text identity and the key field value connected to the key group. 'Key Field' values are hard-coded ones. If there are assigned values for the key fields in (CMS038), the corresponding key group in (CMS034) cannot be changed or deleted.
Note: You can leave the key field values and text identity as blank although this is not considered a generic setup. The field values must also be blank in the XML for the custom text block to be displayed.

In 'Print and List. Configure' (CMS005), single division used (SNDI) field for (CMS038) is activated.

Follow these steps to assign key values to a text identity:
  1. Start (CMS038).
  2. Specify the 'Text Identity'. This text ID is connected to a key group.
    Note: The position of text identity may vary depending on the sorting order used.
  3. In the 'Key Group' field, specify the unique key group ID. The field is maintained in (CMS034).
  4. Click apply. The column labels are based on the labels of key fields specified in (CMS034).
  5. In the 'Value' field, specify the value of the key field to be compared to an object or value in 'XML Custom Text Section Control. Open' (CMS033).
  6. Use option 1='Create'.
  7. On the E panel, the value of the key fields are reflected and cannot be changed.
  8. Press Enter.

D. 'XML Custom Text Section Control. Open' (CMS033)

This program is used to connect the Key Group (CMS034) to a Base XML section (CMS007). An object, value, or combination of object and value is then assigned per key field to be compared to the values in (CMS038). Once this information is matched, Custom Text block will be available in the XML structure.

Fields to consider on (CMS033/B):
  • Printer file - where the configurable text block is connected.
  • XML Section - where the configurable text block is associated. This field should have a value greater than 100. It is also shared in other CMS programs such as 'XML Section. Open Table' (CMS008) and 'XML Custom Subtotal Fields. Connect' (CMS018).
Fields to consider on (CMS033/E):
  • Key group - indicates the unique key group ID and is maintained in (CMS034).
  • Base XML section - indicates the base XML section where the configurable text block is connected.
Ways to set up 'XML Custom Text Section Control. Open' (CMS033):
  • Using values as key fields - used to put hard coded values. When these hard coded values match the record in (CMS038), the Custom Text block is shown in the XML file.
  • Using objects as key fields - used to define objects based on the available table field value. When these object definitions match the records in the XML structure, the Custom Text block is shown.
  • Using both values and objects as key fields - used to define both objects and values for key fields. This selection follows the behavior that if hard coded values match (CMS038) and if object value matches the XML structure, the Custom Text block is shown.
Follow these steps to assign Key group to a base XML section:
  1. Start (CMS033).
  2. In the 'Printer file' field, specify the unique identifier for configurable XML output.
  3. In the 'XML section' field, specify the value of the XML section that must be greater than 100.
  4. Use option 1='Create'.
  5. On the E panel, specify a unique key group ID in the 'Key group' field. This field is maintained in (CMS034).
  6. In the 'Base XML section' field, specify the base XML section which is considered the parent section. When you print the base XML section, the child section is also printed.
  7. Specify either an object, value, or a combination of object and value. The object indicates a key field in an M3 Table. The value field indicates the value of the key field to be compared to a value in (CMS038).
  8. Press Enter.

E. Connect the Custom Text Block to the XML Structure in (CMS007)

After creating the records for Custom text block, it can be added in the based XML section in (CMS007) and printer file can be printed. As expected, configurable text block should be displayed in the XML structure.
  1. Start 'XML Structure. Open' (CMS006), select XML structure and use option 24='XML Structure. Open Section' to start (CMS007).
  2. Select a section where to include custom text block and use related option 24='Add Custom Text Block' in (CMS007).
  3. M3 Browser to display the section and key group created in 'XML Custom Text Section Control. Open' (CMS033).
  4. Select the record where to add the section in the XML structure.
  5. Once connected in the XML structure, Custom Text block is available when printer file is generated.

Same text identities but different start dates can be created in 'XML Custom Text. Open' (CMS036). 'Text identity' and 'Language' are the first keys to match followed by dates. If a matched text ID and language is found but the dates are invalid, fallback to a record with blank language is not considered. Instead, the text block is not displayed in the XML structure.

For different text identities, language then dates are considered for the text block to display in the XML structure. But if there is no match record in the division, text identities are searched in the blank division.