How do I change a link destination based on user role?

I have a link that takes the user to another screen.

I want the link to take the user to screen A if the user is Admin, or to screen B if the user is not admin. (I use a true/false property in the users list to identify admins).

I know that I can create two versions of the link, with different visibility rules, and have each version take the user to the applicable destination. But I want to know if this will also work:

Can I create two click actions on the link? The first action would go to screen A “sometimes” (if the logged in user is Admin), and the second action would go to screen B if the user is not Admin).

Can this be done? Are multiple click actions supposed to work this way? Or should I stick with the traditional first method?

UPDATE: I’ve tested it and both methods work just fine. So my updated question is: Is there a reason I should use one method over the other?

Thanks to everyone!

Both methods work but both have their own delay (Usually about 1 second)

Using 2 click actions on a button will display the button faster but the click action will be slightly slower.
Using the visibility option will display the button slightly slower but the click action will be faster.

2 click actions would be ideal on actions within lists (where there would be multiple instances of the button, you’d want faster visibility.)
Visibility option would be ideal on standalone components (like standalone text or buttons)

1 Like

I feel like visibility speed should be top priority always, I believe users can have some understanding that pressing a button to make things happen triggers behind the scenes processes that may take some time for things to be created/edited/loaded etc.

If things take a long time to just show up on the screen when visiting it, it really feels like the app is running slow and has poor performance. I know that’s how I think from a user standpoint.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.