Hello!
I had a condition in Starting view:
IF(
(USERROLE()=โAdminโ), โHomeโ,
โGeneralโ
)
But when I change the user in the emulator to a user with (USERROLE()=โUserโ), the condition is not working properly, it shows a view that has a view condition (USERROLE()=โAdminโ), but in the primary views the expression on the Starting view is working OK.
The โpreview asโ functionality does not really work 100%. Your expression looks correct.
What do you mean with this?
Iโm assuming you entered a different userโs email address here:
Iโm saying the โpreview asโ doesnโt really work quite as youโd expect and you wonโt be able to properly test this expression using it, but that your expression appears to be correct so it should work as youโre wanting.
Although maybe I misread, since the following doesnโt really make much sense to me:
Views that I have:
โHomeโ Display Show if condition= (USERROLE()=โAdminโ)
โGeneralโ Display Show if condition= (USERROLE()=โUserโ)
โPersonalโ Display Show if condition= (USERROLE()=โUserโ)
If a (USERROLE()=โUserโ) opens the App, the first view that the App shows is: โHomeโ and it must show โGeneralโ as a view. So is not workin properly, neither the expression nor the condition if the user is: (USERROLE()=โUserโ)
How do you know it is not working? Are you using the โpreview asโ in the emulator, or are you actually using the app with a different userโs sign-in?
In the emulator, if I use the App is ok, is working fine.
I agree with Mark. The preview as a certain user, though much improved this year, still has issues. In other words, something may work perfectly for that user when logged in on a phone or browser but previewing as that user in the emulator may not work as expected.
User | Count |
---|---|
35 | |
31 | |
28 | |
23 | |
18 |