On a condition type field can we limit which table fields are selectable?

Stephen Sturde
Tera Guru

I want to add a table field and condition field to a form so that users can build conditions. I want to limit which fields they can select and possibly limit dot-walking in conditions. Is there a way to restrict which fields they can select in the condition builder?

-Stephen
5 REPLIES 5

Aman Kumar S
Kilo Patron

There is no straight forward solution for this, the best we can do is to restrict read access for the fields. But that is going to impact user's ability to read those fields anywhere in the platform.

Refer to below solution:

Condition Builder(field)

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

bernyalvarado
Mega Sage

Hi Stephen,

 

Indeed there's a way to restrict which fields are shown to the user in the condition. What you will need to do is to add the attribute restrictTo to your Condition field and list the fields that you will like to be seen separated by a semicolon.

 

Thanks,

Berny

Here goes an example of the attribute: 

 

restrictTo=description;short_description;assigned_to

Can confirm (for the benefit of anybody else who finds this), this works, confirmed in Tokyo.