Hello,
I try to create a form with some basic information hidden based on the current users role [debugging].
If the user has the role “[debugging]” all hidden fields should be shown. If the user has the role not, all related field should be hidden.
At first I had a subform with fields Userroles, HideDebugging information, UniversalID etc as the first element on the form.
The related fields to hide are all over the form or subforms.
The formula in the Hidedebuggingfield (Number, Computed for display) is
@If(@IsMember(“[debugging]”; @UserRoles);@False;@True)
or
@If(@IsMember(“[debugging]”; @Userroles);0;1)
In the hide-when for every line I use just Hidedebuggingfield.
Now I switch between using the role or not using the role.
On some lines it works fine on others not. I double checked the form and the reladed subforms.
If I refresh the form via F9 everything works fine.
I tried to move the hidedebugging field to the form or use formula direct @If(@IsMember(“[debugging]”; @UserRoles);@False;@True) in the line hidewhens.
I also tried a field Userroles (Text multivalue, computed for display) followed by another computed for display number field with @If(@IsMember(“[debugging]”;UserRoles);@False;@True)
It never works correct for the whole form. Some elements hidden, others not. After using refresh, F9, the fields are shown or hidden based on the current role.
In my opinion the execution is extremly strange.
Hopefully someone else tried to show/hide fields on a role like debugging.
Any hints are welcome.
Thank you advance
Regards
Ingo
PS: It should also work under 6.5.2