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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Thingworx checkbox in collection widget.

SH_10403254
6-Contributor

Thingworx checkbox in collection widget.

Hi there,

 

I am new to Thingworx, I have created a Mashup which contains a collection control, within that collection control I have added a mashup of a checkbox. My requirement is to check only checkbox within collection (Like radio button). I have tried different ways but couldn't achieve it. Like I added a checkbox on parent mashup and passed child mashup checkbox state which affects all checkbox's state within collection. Any idea would be appreciated.

 

Thanks,

5 REPLIES 5

If I understand correctly you have one collection mashup which should have a different state depending on some criteria.

  • You can add 'MashupPropertyBinding' (see CollectionWidget) where you can specify mashupParameters which are passed to the collection mashups. the value can differ for each mashup of the collection. The mashup you use in the collection will have to have a mashup parameter with the name specified.

or

  • in the collection mashup you call a service which returns the state of this collection mashup (may not be to efficient)

Let me know if you know what I mean

 

SH_10403254
6-Contributor
(To:nmutter)

Thanks for replying @nmutter,

 

Requirement is to populate items as checkbox list in collection widget like below which I have done.

CollectionWidget.png

Now the problem is to make these checkboxes work like radio button (Only one should be selected). As far as I know all child mashups render independently and have no direct link with each other. If I trigger an event it also triggers for itself too. I couldn't built a workable logic yet. 

I see.

Can't you use the RadioButton widget using the "Radiogroup" to group the buttons? This should work with or without collection widget (the radiogroup is used in the whole UI). You would then need to react on the isSelected=true change to know which one the user has selected for your logic.

SH_10403254
6-Contributor
(To:nmutter)

Yes you're right I can use radio button widget but to keep the design consistent requirement is to make only check boxes among which few will work like radio buttons and rest will work in a normal way.

You can try enabling AllowSelection, disabling MultiSelection and use the CellMashupSelectedField to specify a mashup parameter which will drive the checkbox state. Note that as the checkboxes themselves will display the selection state, users will be able to use the entire cell area to check or uncheck the checkboxes. You may want to disable those checkboxes and only have them readonly.

Announcements


Top Tags