how to make a tab visible if the logged in user has admin role

how to make a tab visible if the logged in user has admin role

  
Hi All,

I have a  webscreen with serveral tabs and click of a tab will be redirected to specified detaination.So now i want to make a particular tab invisible if the user logged in does not have admin role.I have tried this by enclosing the tab in menu weblaock visual IF and wrote a condition as shown below.Now when i log in as normal user i can still see the tab but not with a click action or on it.Is something worng in the condition which i have shown below.
If(BooleanToInteger(CheckSLHubAdminRole(Session.UserId))>0,Session.ShowTabs,False)


Thanks,
Prashanth
Hi Prashanth,

That pattern should be simple to do, most of the sample Apps that you can download also have it.

Look for example on the menu from the Cases eSpace:


Not sure what you did on your eSpace, but the condition looks a bit complicated. Why not just:
If(CheckSLHubAdminRole(), Session.ShowTabs, False)

Regards,
João Rosado
João Rosado wrote:
Hi Prashanth,

That pattern should be simple to do, most of the sample Apps that you can download also have it.

Look for example on the menu from the Cases eSpace:


Not sure what you did on your eSpace, but the condition looks a bit complicated. Why not just:
If(CheckSLHubAdminRole(), Session.ShowTabs, False)

Regards,
João Rosado
  Hi Rosado,
 Thanks for reply.
 I did the same thing which you have shown,but in output screen i am still able to see a part of the tab as shown below.I dont know why it is till showing a part of the tab.Please find the attachment related to this.
 
Thanks,
Prashanth
 
Hi Prashanth,

The problem is that you need to put the IF around the tab container, not inside.



See the container line around your IF? That needs to be inside the True branch.

Regards,
João Rosado
João Rosado wrote:
Hi Prashanth,

The problem is that you need to put the IF around the tab container, not inside.



See the container line around your IF? That needs to be inside the True branch.

Regards,
João Rosado
 Hi Rosado,
 Thanks a lot.I have just started the usage of outsystems and bit confused while using the IF widget
 Now it is working fine.Once again thanks to you for refershing my basics on outsystems.:)

Thanks,
Prashanth