Skip to main content
6-Contributor
Jun 21, 2022 8:59 PM UTC
Solved

Disabling Link Widget after it is clicked

Hi,

I have a Link widget that always fails the second time it is clicked. It is meant to download a file, which it does the first time, but then sends the user to a default "Could not provide media" page the second time. I've fixed the issue via an auto-refresh pointed at the service that provides the URL for the Link widget, but that only works if the user waits to click again. Is there a way to cause the link to be disabled after it is clicked once? I was hoping Thingworx allowed services to reference widgets, but sadly this feature does not exist from what I've read. Any help would be greatly appreciated.

PaiChungAnswer
22-Sapphire I
Jun 23, 2022 12:34 PM UTC

Widgets usually have a Enabled and Visible aspect that you could potentially set after a click event?

2 replies

PaiChung22-Sapphire IAnswer
22-Sapphire I
Jun 23, 2022 12:34 PM UTC

Widgets usually have a Enabled and Visible aspect that you could potentially set after a click event?

Translate
6-Contributor
Jun 30, 2022 6:04 PM UTC

This turned out to be the case. I was trying to set a Boolean property in my core Thing that a service would alter and feed to the disable property of the widget once the service was activated. This was being odd in it's behavior so I moved to making a button that set the links disabled property to true via a function, keeping all the process in the Mash-Up. Worked great. Thanks for the input!

Translate