Is it possible to set a button to be visible to only certain accounts?

Hi,


I am creating a traditional website and I would like if the administrator account will have a button linking to the administrative page visible but not visible to the rest of the users. Is this possible?

Solution

Hi Jonathan,

You can achieve this by wrapping your button in If widget and use condition to CheckAdminRole(UserId:), if user has admin role button will show.

Hope it helps

Regards

Seema

Solution

Hi Jonathan,

yes you can do using role.

in logic tab have roles section here you can add your admin role and accordingly visible this button.


Hope this will help you.

Regards

Rahul Sahu

Yes on the visible/display property of the button you can call the checkAdminRole() function 

Hi Jonathan,

Yes it is with roles. Basically you need to assign a role to those administrator accounts and check that role to decide if you want to show the button.

Some documentation about it here and here. And a video from the learning material.

Regards,

Marcelo

Thanks everyone,


Managed to get it working without issues.


Cheers.

Jonathan Ng  it isn't a good practice use client side validation by using  visible/display property of the button.The best approch is using an IF statement as posted by Seema Pandey. All the best