I have created a State definition with 3 values for a Radio Button and set a Default State as one of these 3 values. But at Runtime its not defaulting to that selected value.
Am I missing any step?
1. Created a custom state definition with 3 values as : On, Off, NotSet
2. Mentioned Default State as : NotSet
2. Selected above created definition in Radio button's State definition in Mashup and Save.
4. View Mashup --> Radio Button loading with "Off" as default selection.
what went wrong?
Solved! Go to Solution.
Hi Tarun Nayyar,
For me it works, Thingworx 7.2.4. Just in the Configuration panel a string that you put in the Default State field should conform with the String/Value column:
If you have the same configuration and your problem persists, please try to clear a ButtonStates property in the widget configuration panel and set it again to your StateDefinition. Sometimes it gets cached and doesn't update after change in the Composer.
Hope it helps.
Did the same and getting the desired result on Thingworx 7.3.1 instance. Please make sure you have saved the custom state definition after setting default value and the STRING value in default should match, case sensitive as set in one of the state definition.
Have you tried to remove the state definition from the radio button widget properties and pick it again? Sometimes Thingworx caches very different settings.
It is defaulting to other value everytime loads
That means - everytime you open a mashup the default picked value is different?
Could you please paste here a screenshot of your State Definition State Information page and Radio Button widget properties?
So really I'm off the ideas. Even though those are numbers, on my Platform it's paired correctly and displays marked "NotSet". One thing you can check if there is no whitespaces - maybe that's why it's not matched, because whitespaces are not trimmed.
One question more, should be asked before: what version of Thingworx do you use?