How to define seen or unseen button with roles in REACTIVE APP

Hello 

How to define the button widget with roles to appear or disappear in the screen With Reactive app.?

Normally , it has to define "Check<role>" built in function.

In REACTIVE app it shows only Getuserid().please see pic no3.


pic1

For username jinji,there is no role and can not see the restricted button.



pic2

For this username Manager,it can see all buttons


pic3

here  is no check<>built in funchiton


Thanks ahaed.

Solution


Create a data action and use output varible as Boolean on screen and check role here like below image-


And use this action on button widget or use IF statement to show or Hide Button.



Hope this will help you.


Regards

Rahul Sahu

Solution

Rahul Sahu wrote:


Create a data action and use output varible as Boolean on screen and check role here like below image-


And use this action on button widget or use IF statement to show or Hide Button.



Hope this will help you.


Regards

Rahul Sahu

 Hello Rahul Sahu

Thank you for the reply .Thank you for the solution.

The Difference between us is as follow. i dont know Why i have "Role Id " in this and how to solve?

I made dependices "user role entity "from system to create the user and its role  in the screen. 

 Thanks ahead.

Hi EiMon,

A second option is to use the Javascript API if you want to check the role on the client side.

Hope this helps.

Regards,

Nordin

Nordin Ahdi wrote:

Hi EiMon,

A second option is to use the Javascript API if you want to check the role on the client side.

Hope this helps.

Regards,

Nordin

 

 Hello Nordin

This is also the great way.If so , do i have to write the js in the screen action proeptey? i am not clear.it would be helpful if there is extra info.

Thank you ahead.

Eimon

Hi EiMon,

You can javascript action on page event  "OnInitialize" like below screen


use this output to hold in local variable and use this on IF widget or Button visible property.


Regards

Rahul sahu

Hi EiMon,

I have attached a small sample OML to complement Rahul's explanation.

Regards,

Nordin

Thanks @Nordin,


Regards

Rahul

Nordin Ahdi wrote:

Hi EiMon,

I have attached a small sample OML to complement Rahul's explanation.

Regards,

Nordin

 

 Thank you so much Nordin .

I am keep going on the learning path.


Rahul Sahu wrote:

Hi EiMon,

You can javascript action on page event  "OnInitialize" like below screen


use this output to hold in local variable and use this on IF widget or Button visible property.


Regards

Rahul sahu

 Thank you so so much!

Rahul sahu.

 

You're welcome EiMon and Rahul