Enum handling at runtime

0
Actually, I have 3(A,B,C) values in my Enum and I am going to use this Enum in search bar. In that search bar Drop down, I only want to show 2(A,B) values of enum to some particular User group and all 3(A,B,C) values to some User group    
asked
4 answers
1

Hi,

I can not think of any way to achieve this other than having two enum attributes: enum1 - (A,B,C) and enum2 - (A,B). You can make sure their values match by using a Before Commit microflow.

Perhaps, some else has a better idea.

-Andrej

answered
1

The latest version of my GridSearch widget package might meet your needs. It contains a searching widget where you can create your own XPath filters. You could use this with conditional visibility to display either a widget with 2 options or a widget with 3.

 

Download here (latest not published in the app store yet):

https://github.com/tieniber/GridSearch/blob/master/test/widgets/GridSearch.mpk?raw=true

answered
0

Hi,

 

Variable Enum values are not possible in Mendix, I would fix this using an entity and add a reference set from the User group to select the possible options. But as far as I understand the search bar is fixed and will show all possible options. So to make make this possible you should have to add the data grid twice and add a visibility condition.

 

Good luck

answered
0

Try using this widget: https://appstore.home.mendix.com/link/app/56183/Finaps/EnumSelector

I think that will solve your problem.

Regards,

Ronald

answered