Page 1 of 2
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Mon Sep 01, 2014 9:24 pm
by Craig Rowland
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?!?
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Mon Sep 01, 2014 9:39 pm
by Yurii Orishchuk
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.
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Mon Sep 01, 2014 9:41 pm
by Craig Rowland
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
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Mon Sep 01, 2014 10:16 pm
by Yurii Orishchuk
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.
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 7:32 pm
by Craig Rowland
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
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 7:51 pm
by Craig Rowland
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.
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 7:59 pm
by Craig Rowland
Full mapping here but again, Company writes to DB but nothing else.
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 9:00 pm
by Craig Rowland
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.
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 9:38 pm
by Craig Rowland
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?"
Simple Query For Newb. Posting Multiple Form Fields to the DB and not just one entry
Posted: Tue Sep 02, 2014 9:46 pm
by Craig Rowland
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.