PDA

View Full Version : Strings "Yes" and "No" rendered as boolean values



bruhast
26 Sep 2018, 8:21 AM
Hi -

I'm having an issue where items returned from the database are being rendered differently than their raw value.

If you notice the field propertyname in my model below, it's of type: 'string'

fields:[
{name:'propertydefinitionid', type:'int',defaultValue:0},
{name:'propertysort', type:'int'},
{name:'propertyrequired', type:'boolean'},
{name:'propertyname', type:'string'}
],


If I enter the value "Yes" on a form and save, then the value inserted to the database is correct. However, when rendering that form field, it's converted to "true". If I enter "Yes " (or any characters in addition to simply "Yes", then the word Yes is rendered correctly as part of the string.

I can't necessarily use a convert function, because then users could never enter the value of "1" without it being manipulated.

The store is being created through an ajax proxy.

Any advice?

Forum_Adm
28 Sep 2018, 10:31 AM
I have sent this to the support team to look into further. Thank you so much for your patience while this is being worked on.

Michele

bruhast
1 Oct 2018, 6:51 AM
Thank you, Michele!


I have sent this to the support team to look into further. Thank you so much for your patience while this is being worked on.

Michele

rakumar
1 Oct 2018, 11:42 AM
Hello, hope you are doing well.

Can you provide a working fiddle showing your issue. String field types are not converted to Boolean. On what form field are you rendering your value. Please provide an example.

Regards,
Kumar
Sencha Support.