User role specific text box validation

0
I want to add specific validation to a text box for a certain user role. For example, the form fields can be seen by all users, but only a user with a role of ‘Line Manager’ is required to complete the salary field. Can this be done using the Validation property on the text box or is it only possiable through a microflow?    
asked
2 answers
1

Yes, you can do that without using a microflow for the validation. But you will need to put the field on the form twice. Once in a container visible for anyone except the certain userrole, and not having the validation required. And once in a container visible for the certain userrol with having the validation required.

answered
0

on your save action button you can also define a microflow validation. You could check the current users user roles and check whether the LineManager is among them.

 

https://docs.mendix.com/howto/data-models/setting-up-data-validation

5 Advanced Validation with a Custom ‘Save’ Button

 

answered