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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Radio Button Default State selection not setting

TanmeyTWX
17-Peridot

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?

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

12 REPLIES 12

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.

dupatel
19-Tanzanite
(To:TanmeyTWX)

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

TanmeyTWX
17-Peridot
(To:dupatel)

Hi Jakub,Durgesh,

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

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.

But always defaulting to "Reject".

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?

Its 7.1 version

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

Hi Tarun,

What is the value passed in your context to the RadioButton from the Value param?

Resolved.

Was passing 0 value instead of NULL from SQL to State.

little miss it was

Yep So - for now everything is working fine?

If so, I'm glad that could help.

Announcements


Top Tags