Skip to main content
6-Contributor
June 21, 2022
Solved

Disabling Link Widget after it is clicked

  • June 21, 2022
  • 1 reply
  • 1075 views

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.

Best answer by PaiChung

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

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
June 23, 2022

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

6-Contributor
June 30, 2022

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!