Read-only status of UI input control based on the data

How can one achieve such behaviour? Let’s say that user can edit certain column, only if value of other column is set to certain value.

This one could be achieved by Row-Level security rules.

You will create two new row-level security rules under column we want to make read-only.

First one to permit all to anyone (*) without any condition and with level set to high value (999) in order to be run as a last rule only if any previous didn’t match.

Second one to deny update for anyone (*) but with condition - let’s call it ‘OtherColumn_isnot_set_to_certain_value’ and set a level to e.g. 100 so that this rule will be run first.

So if the other value is not set to certain value, first rule matches and the update access is denied and evaluation of rule is stopped. When the value of other column is ‘certain’ the 100 rule isn’t matched and the 999 rule sets all permision.

The ‘OtherColumn_isnot_set_to_certain_value’ rule should look like this:
string(/row/@OtherColumn)!=‘certainValue’

Happy ruling :slight_smile:

1 Like