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

Radio Button Default State selection not setting

SOLVED
Highlighted
Level 8

Radio Button Default State selection not setting

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Radio Button Default State selection not setting

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????

12 REPLIES 12

Re: Radio Button Default State selection not setting

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.

Re: Radio Button Default State selection not setting

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

Re: Radio Button Default State selection not setting

Hi Jakub,Durgesh,

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

Re: Radio Button Default State selection not setting

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.

Re: Radio Button Default State selection not setting

Re: Radio Button Default State selection not setting

But always defaulting to "Reject".

Re: Radio Button Default State selection not setting

Hi Tarun,

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?

Re: Radio Button Default State selection not setting

Its 7.1 version

Re: Radio Button Default State selection not setting

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????