Add custom text blocks
This document defines custom text blocks.
A. 'XML Text Key Group. Open' (CMS034)
- Start (CMS034).
- Specify the key group name. Use option 1='Create'.
- On the E panel, specify the description. This can also be defined per language by clicking the Language button.
- Specify up to four key fields. These key fields indicate a field from an M3 table.
- Press Enter.
B. 'XML Custom Text. Open' (CMS036)
- Text identity and language
- Text identity
Single division used (SNDI) field for (CMS036) that is activated.
- 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.
- 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:
- Start 'XML Custom Text. Open' (CMS036).
- 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).
- In the 'Start date' field, specify from which date the text is valid.
- In the 'Language' field, specify the language from which external documents are to be printed.
- Use option 1='Create'.
- On the E panel, specify the description which can also be defined per language by clicking the Language button.
- In the 'Finish date' field, specify the last valid date of the record.
- In the 'Text type' field, specify the text type to include in the XML file.
- 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'.
- 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.
- Press Enter.
- 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.
- 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)
In 'Print and List. Configure' (CMS005), single division used (SNDI) field for (CMS038) is activated.
- Start (CMS038).
- 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.
- In the 'Key Group' field, specify the unique key group ID. The field is maintained in (CMS034).
- Click apply. The column labels are based on the labels of key fields specified in (CMS034).
- 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).
- Use option 1='Create'.
- On the E panel, the value of the key fields are reflected and cannot be changed.
- 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.
- 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).
- 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.
- 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.
- Start (CMS033).
- In the 'Printer file' field, specify the unique identifier for configurable XML output.
- In the 'XML section' field, specify the value of the XML section that must be greater than 100.
- Use option 1='Create'.
- On the E panel, specify a unique key group ID in the 'Key group' field. This field is maintained in (CMS034).
- 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.
- 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).
- Press Enter.
E. Connect the Custom Text Block to the XML Structure in (CMS007)
- Start 'XML Structure. Open' (CMS006), select XML structure and use option 24='XML Structure. Open Section' to start (CMS007).
- Select a section where to include custom text block and use related option 24='Add Custom Text Block' in (CMS007).
- M3 Browser to display the section and key group created in 'XML Custom Text Section Control. Open' (CMS033).
- Select the record where to add the section in the XML structure.
- Once connected in the XML structure, Custom Text block is available when printer file is generated.
All valid match records in (CMS036) are displayed in the XML structure from the current date of generating a printer file.
Text ID and language combination are the first keys to match followed by the Text ID. Multiple text identities with the same name, but with different start dates are created in (CMS036). Although, only the matched Text ID and language combination, or text ID with valid dates are displayed in the XML structure.
If a matched Text ID and language combination is found but with the date outside the start and finish dates, the combination does not fallback to the record with blank language. Text block is displayed in the XML structure. However, for different text identities, each one is checked for a match in language with valid dates and records with blank language that are displayed in the XML structure for a printer file. A fallback scenario wherein matched record in blank division is considered once there is no match record in division level.
An export configuration is also done in (CMS034) to cover the custom text block setups and information wherein only those Key Group with connected (CMS036) and (CMS038) are included in the Export file. In 'List and Printer program. Configure' (CMS005) Export Configuration option or Ctrl + 27, custom text block is already included. However, the logic is that those Key Group (CMS034) with 'XML Custom Text Section Control. Open' (CMS033) are exported.