cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to show/hide a custom widget based on a logic expression?

hails.alex91@gm
1-Newbie

How to show/hide a custom widget based on a logic expression?

Hello! I am new to ThingWorx and have created a custom widget. I want to hide/show that widget depending on how an Expression evaluates. I have the widget imported and the expression tested, but i do not know how to hide/show the custom widget...could someone give me advice? Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

I do not think so, but i can get it...

However, i figured it out! I used the Expression widget to compare a property field in one of my widgets. Then I had to change the output type from String to Boolean, and then drag that output on to my custom widget. It prompts me to bind with a property, and I chose Visibility...worked like a charm.

Thanks for the help Pai!

View solution in original post

4 REPLIES 4

Since each widget supports that feature, I would look at the code one of the existing widgets uses.

On the server go to tomcat/webapps/thingworx/common/thingworx/widgets

Hello Pai,

Thank you for the response! I am not sure how to view what you are suggesting...

If I go to x.xx.xxx.xxx/tomcat/webapps/thingworx/common/thingworx/widgets, I get a 404 error. I have tried a few variations of teh address, but nothing seems to work. Any ideas?


Thanks again for your help!

You'd have to be on the actual server itself to get to that information. Do you have actual access to the server.

I do not think so, but i can get it...

However, i figured it out! I used the Expression widget to compare a property field in one of my widgets. Then I had to change the output type from String to Boolean, and then drag that output on to my custom widget. It prompts me to bind with a property, and I chose Visibility...worked like a charm.

Thanks for the help Pai!

Top Tags