Business Rule to all widgets on interface

1
Hi Guys, I would be nice (with complex forms) to be able to set a single business rule for all controls on an interface to make them editable or not. Currently I have to set each one individually to a Enum field. Lots of manual work. Is there a current way to do this? Can one set and query the metamodel and do a loop to set all widgets to uneditable in a microflow? If not I would like to add a Feature Request. H
asked
3 answers
1

You can use the "editable" property of a dataview. Set editable on false and all attributes will be readonly within the dataview:

alt text

You could also use entity access to achieve this. Set the attribute access of an entity to read. This way the attributes will be read-only for your configured module role.

Edit:

If you want to do that conditionally then you should create entity access for readonly and readwrite. Then you could use an enumeration to add a module role to your users which has the right access.

answered
0

That is a good start. I would like to do that conditionally though. So I would like to have been able to set that to a condition based on a enumeration or business rule.

answered
0

Instead of using security, you can also set conditionionally editable on almost any input widget. This can be based on a boolean or enumeration attribute.

See this howto: https://world.mendix.com/display/howto25/Set+up+visibility+and+editability+based+on+an+enumeration

answered