Posted: 25 Mar 2019 2:57 EDT Last activity: 7 Jan 2020 9:27 EST
How to make data type columns to read only?
We have a requirement to make data type columns as read only. This can be done through declare expression. But whenever I try to add new rows, a new row will be added with empty value to the read only columns which cannot be further edited. Is there a way to make columns as read only, and after adding new record, read only column record should behave like that of primary key, i.e it should be edited once and then to ready only.
***Edited by Moderator: Pallavi to update platform capability tags***
1. Go to the "DataTableEditorReport" or the report which is loading up the data type.
2. Click on the setting icon for the column which you want to make it as read-only.
3. In the Column Format provide "KeyInput" control(mentioned in screenshot). It may or may not allow to save this change. In case it does not allow to save then create a new Control rule by name "KeyInputNew" in your ruleset and copy the code mentioned in the pzKeyInput(OOTB rule) control to your rule and mention this new rule in column format.
4. Go back to data type , the column will be read-only once the value is provided after first time.