Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

Adding Multiple Inputs to a database.
I am only able to write 1 input to my database (collection) no matter how it is mapped. All the tutorials use only one entry as an example so I presumed its the same principle, map each input to each database field i.e. InputCompanyName to Company Name OR AccountNumber to Account Number.

No such luck. My list service works great just cannot write more than one item to the database.

Any ideas. Im clearly missing something very simple but i'm not getting anywhere and I have restarted about 4 times now.

Do i have to create 1 service per field?!?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

Hi Craig,

You can write as many fields per one create/update service into the one collection item as you need.

But i see you noticed item and fields.. And have some confuse on it.. So please provide us screen shots of mapping and describe what is not work for you.

Also here is example of mapping where exist three links to three item fields: http://prntscr.com/4irl2l/direct

Regards.

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

mine looks just like that EXCEPT the Edit JS. Do I have to add JS to each item being mapped?

The 1st Entry on my form goes to the DB, but the other entries do not. They remain NULL

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

Craig,

It hard to say what is wrong. But if you use some JS it can generate an error it's true.

Give us your app public link and describe steps to reproduce this issue.

Regards.

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

here is the link. Again, list service works fine. Create service writes the Company name to the database, but no other fields map.

http://appery.io/app/mobile-frame?src...

the app link above has only two items mapped Account No. and Company. but i have tried all ways and nothing

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

Just a thought

I originally created a DB. THEN I created a Collection. (since removed)

But for this app. I only just created a collection but no database. I found the instructions for this part confusing. I couldn't see why i would create a DB with no columns on one hand and then create a collection and add columns to it.

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

Image

Full mapping here but again, Company writes to DB but nothing else.

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

OK. I started from scratch. It works EXCEPT, the date fields were causing problems.

I had two Date Picker fields. Without them, the form writes to the DB but with them it won't work. Do you have any advice around that specific issue?

The good news is, I was actually doing it right so the instructions did work and it is indeed easy. Silly problem.

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

to update further still no joy. I changed the format to yy-mm-dd as per here https://getsatisfaction.com/apperyio/...

I also used the java snippet but again, it didnt work.

the problem remains "How can I write date values from the DatePicker to the database column?"

Craig Rowland
Posts: 0
Joined: Mon Sep 01, 2014 9:24 pm

Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry

OK. I feel like i am spamming you now.

I solved it by

1) changing the format in the properties of the datepickerAND
2) mapping to the Date Value rather than the default Date Format

I had tried this earlier but before the format was edited within the datepicker properties.

This can be marked as closed.

Return to “Issues”