Skip to main content
17-Peridot
January 22, 2017
Solved

Radio Button Default State selection not setting

  • January 22, 2017
  • 2 replies
  • 6524 views

Hi,

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?

Steps followed:-

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?

Best answer by TanmeyTWX

I found out why it is not setting to default value.

If I remove its "Selected Value" binding,It works for Default selection.

But why Its not working with "Selected Value" binding????

2 replies

1-Visitor
January 22, 2017

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.

Regards,

J.

5-Regular Member
January 22, 2017

Tarun Nayyar

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.

-Durgesh

TanmeyTWX17-PeridotAuthor
17-Peridot
January 23, 2017

Hi Jakub,Durgesh,

I'm doing the same,exactly but no luck.It is defaulting to other value everytime loads

1-Visitor
January 23, 2017

Hi Tarun,

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?

Regards,

J.