Page 1 of 1

Saving data to Database

Posted: Tue May 20, 2014 2:43 pm
by nmlaur

Not all of my fields are saving in my database when people click the submit button, The text they enter in the text box does not save, nor does the date it just shows up as mm/dd/yyyy


Saving data to Database

Posted: Tue May 20, 2014 3:22 pm
by Serhii Kulibaba

Hello,

What fields are save data?
Please send screenshots with mapping your service and service settings.


Saving data to Database

Posted: Tue May 20, 2014 3:36 pm
by nmlaur

Image

All the other ones save except for those 2 fields


Saving data to Database

Posted: Tue May 20, 2014 8:29 pm
by Maryna Brodina

Hello!

Could you clarify why do you use string type for date? It's better to use date type. Please also post mapping screemshot.


Saving data to Database

Posted: Tue May 20, 2014 8:39 pm
by nmlaur

Image

I changed the Date field and it still didn't change it.


Saving data to Database

Posted: Wed May 21, 2014 1:13 pm
by Evgene Karachevtsev

Hello,

Could you please check if you have any errors in developer console?


Saving data to Database

Posted: Wed May 21, 2014 1:47 pm
by nmlaur

It tests fine


Saving data to Database

Posted: Thu May 22, 2014 12:29 am
by Yurii Orishchuk

Hi Nmalaur.

You probably mistaken in your mapping. (Sorry but screen shot you have provided above can not to answer this question).

See detail in screen shot: http://prntscr.com/3le7ok/direct

So you have to use "Date value" component property.

Please note: if you using "string" field type in DB - your direct mapping would be ok.

But if you using "Date" field type in DB - it requires some format to store it correctly.

See solution for this case:

1 Navigate to "Request" tab.

2 Find "Date" parameter in request tab and click "Add JS". http://prntscr.com/3aqhpn/direct

3 JS editor appears. Fill it with following code: http://prntscr.com/3aqic0/direct

precode

return new Date(value).toISOString().replace(/T.*/gi, "");

/code/pre

Regards.