Adding CLOB Text to a Representation Class
This document provides information on how to add CLOB text to a representation class. You can manage CLOBs using Supervisor management or your own code. The development process described below shows how you can use Supervisor management to manage CLOBs without writing a script.
Prerequisites
Make sure you have finished your development for the key element or entity requiring CLOB management. For example, the data table, data class, and representation class must have been defined, and the class representation must be visible in the client.
Creating the data table
As a rule, CLOBs should be stored in their own data table, separate from the main data. This is particularly helpful to reduce disk space use.
- Create a new data table (MYTABLE1) in Development > Data and Parameters > Tables.
- Go to the Columns tab and link the key field to the main data table in the Linked table field.
- Add a specific field for CLOBs with the "ACRTF" data type.
"ACRTF" is a predefined data type used to manage text files. Other data types used to manage CLOBs are "ACHTML" for HTML, and "ACPLAIN" for plain text. Each data type is defined as a rich media type with Supervisor management. - Save and validate your data table.
Updating the data class
You now have to add the property defined in the data table to the data class.
- Open your key entity data class.
- In the Properties block of the Properties tab:
- Add a code for the CLOB in the Property field.
- Set Type to "ACRTF".
- Set Lob table to the data table name defined for your CLOBs (MYTABLE1).
- Set Lob field to the field defined specifically for CLOBs in the data table.
- In the Keys block, set Value to the key field in the main data table.
Note: This step is mandatory. - Save and validate your data class.
Updating the representation class
You now have to add the property defined in the data class to the representation class.
- Open your key entity representation class.
- In the Blocks block of the Organization tab, add a code and a section for your CLOB field.
Note: This step is not required if the CLOB field is added to an existing block. - In the Displayed Properties tab:
- Add a code for the CLOB in the Property field.
- Add the block where the CLOB has to be managed in the Block field.
- Set Detail, Edit, and Enterable to "Yes".
- Save and validate your representation class.
The menu item for the representation class now contains an area to manage CLOBs, either in a new block or in an existing block, depending on how the representation class was defined.