Skip to main content
1-Visitor
October 6, 2020
Solved

How to visible navigation button in Mashup with different user

  • October 6, 2020
  • 1 reply
  • 1770 views

Hello Everyone, I'm newbie in Thingworx. I have a project with this platform.

How to get visibility in navigation button with different User?

For Example,  

I want to build a Mashup with username and password login. Even, it can directly access to the mashup. But, the display is in read only mode or Navigation Button isn't available. Then, if User login with Username and Password, so the display will show the navigation button that they can operate it.

Anybody can help me with the step by step? Thanks

 

Best Regards,

Muhammad Alfin

Best answer by PaiChung

You can use a service to grab currentUser/currentUserGroups and return a 'true/false'

So you will need to create a service that uses one of these services and then compare that to  some reference to determine to output a true or false to control visibility

1 reply

22-Sapphire I
October 6, 2020

Each widget has a Visible property.

Toggle that based on who is logged in.

You can use a service to grab currentUser/currentUserGroups and return a 'true/false' 

1-Visitor
October 7, 2020

Hello @PaiChung  Thanks for your response

Would you tell me about the service code? and  what kind of snippets of the service in the thing that have a correlation about current user then it will give the state value based on user?

Thank you very much

PaiChung22-Sapphire IAnswer
22-Sapphire I
October 7, 2020

You can use a service to grab currentUser/currentUserGroups and return a 'true/false'

So you will need to create a service that uses one of these services and then compare that to  some reference to determine to output a true or false to control visibility