...
- Go to Company Parameters and create a new one.
- Fill in the mandatory fields in the PP table.
As 'Table Type' select JSON; as 'Value Type' select JSON or JSON2 depending on whether you want to have one or two key columns. - Select the newly added PP and proceed to the right pane with Company Parameters Values.
- Click the table header and select 'Customize Attribute Extensions' from the context menu.
- In the popup dialog create new columns.
- Close the dialog. (Your entries will be saved.)
- To see the new columns in the Company Parameter Values table, click elsewhere in the table (e.g. a different Company Parameter).
- Go back to your Company Parameter and the table on the right will be updated.
- Add the Company Parameters values in the table.
Examples
As mentioned above, all special columns are saved in one column called "attributeExtension".
- For the JSON table, the key is the column "name".
- For JSON2, there are two keys "key1" and "key2".
Fetch
Querying data is similar to a Company Parameter table.
...
Code Block |
---|
def filter = Filter.and(Filter.equal('key1', key1),Filter.equal('key2',key2) |
Insert
Inserting values needs more steps. Since all special columns are saved into one, it is necessary to join them in a map first and save this map.
...