Access Rules: Prevent Setting Choice Field Values + Allow Checkbox Activation Based on Another Field

Hey :slight_smile: ,

I have some questions about access rules:

  1. Can we Prevent Setting Choice Field Values to avoid accidental entry of non-existent options?
  2. I have a record and I want to allow it to be set to true only if another field meets a certain condition (valid URL and not empty).
  3. Is there a publicly available template with a collection of access rules for inspiration or examples?"

Thanks

In addition to the main Access Rules documentation We have a few examples of Access Rules here: Intro to access rules - Grist Help Center, and a webinar recording at Access Rules for Teams - January 19, 2023 - YouTube.

I like the idea of a collection of small Access Rules recipes.

For now I made a public document for your first two questions: Access Rule Examples - Grist.

Try changing the column Value: choices A, B, and C (and empty) are allowed; anything else will fail. This is done using IsValid formula column (it has to list out the valid choices), and an access rule that prevents Create and Update when newRec.IsValid is false.

The second table (Valid URL) is just an example of a formula that’s true when the valid in URL is valid, and false otherwise. Not sure if that’s all you meant. If you meant that this should control whether some other fields can be set, you can add an access rule similar to the one in the first example.

1 Like

Hello ,
thank you very much
In your document , it was showing the value β€œD” with a square red
when I forked it , i could create β€œD” , even if it didn’t exist in the list , is there a particular reason ?
but after that , i was limited to only {β€œβ€, β€œA”, β€œB”, β€œC”}
imageimage
image

And for the second case , what I meant is :
the user is allowed to check the checkbox to true (completed column ) only if the URL column is valid and not empty or another condition .
image

Anybody got an idea?