Is it possible to restrict what drop down options are visible according to the group the user is in? The requirement is that for a certain group they would only be able to select one of the above options.
Is this the normal gateway direction chooser? Or is it a choice field or relation selector in a submission sub-page?
Bob, it’s a submission sub page, the choices held in a data type.
You could use the Custom - Exclude Choices presenter, If you haven’t got a copy, DM me and I can send you a copy - you could add 2 choice lists to your UI, and setup each accordingly (1 with just one choice, the other with all choices) and then show/hide each based on group access.
For Choice fields it depends on the complexity of the logic you need.
If it’s always the same options you need to show, then this can be done using the Presenter from the App Share which Jonathan mentioned (or if you’re on the latest version 25.3 this is now a standard feature so can do it out of the box).
If it’s only a couple of different variations of the option list, then Jonathan’s other suggest will work great, just have two or three copies of the choice field on the page, each only showing the relevant options (using the above solutions), and then only show the relevant one using subsets or visibility requirements.
Or, if it’s more complicated than that, you can defer the logic to Code Studio using a Fragment Callback. This will let you modify the list using code, and can be be based on more complex criteria, about the logged in user for example.
If you have the choices as their own object you can create a one to many relationship to the groups, then have the choice as a relational selector from your form object. With this you can restrict from user object through the groups to the form data. This will require an admin page to set all the relationships.
Thanks all. I’ve installed the presenter from AppShare and it is doing what I need.
Hi David, I’m glad you found an AppShare item that resolved your issue.
Thanks for using AppShare.
Best Regards,
Mark Pearson - AppShare Manager
