Starting view issue

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.

0 7 347
7 REPLIES 7

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:


In order to test the functionality of your USERROLE()-based expression 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.

Top Labels in this Space