Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
Good Afternoon,
I am currently trying to learn how to use MobileTogether before I get into building the app that I have in mind I am trying to understand the basics.
So, to that end I have a 'test' msAaccess database with a single table which has two fields - the primary key myID and a second field myNAMES. I have followed the training videos to the start of number 3 - Pt 3: (Building a Database Driven App) with no problem - I understand and can use the controls provided (labels, edit fields, buttons etc.), I can connect to the database and display records & field(s) from the database. What I just cannot get my head around is how to write back the data from an edit field into the database. I have watched Pt 3 numerous times but it is doing my head in - I need to walk before I run!!
Please does anyone know of a very simple example that I can look at, or of a resource that I can use, to 'reverse engineer' the process so that I can understand how it is done?
Thanks in advance.
Bigwibb
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
This should be very simple. I guess you will want to add a Save button to your page which executes a Save action. If you watch Pt 3 video - narrator adds such button at around 6:50 video time
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
Hi bbv,
Yup - I have watched that far and have added a Submit (save) button to the page, it's really the control actions for the page and button that are foxing me :)
Thankyou for your prompt reply.
Ian Wibberley
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
Hi bbv,
Update:
I can now write to the DB - YAAY But the contents of every record are replaced by the submit - BOO
Ian Wibberley
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
It is very difficult to say what is wrong based on YAAY and BOO.
But you can send here your design file with exact description what you do, we can quickly let you know then
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
Hi bbv, Apologies - please pardon my sillyness lol - I've been at this one problem for the last two days and I'm beginning to lose the plot.
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
ok, and now describe what you are trying to achieve on Submit
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
bbv,
I want to write the contents of the editfield1 on the subpage to a single new record in the database.
Wibbs
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
If you want to stay on this page after submit and add another record, then add these two actions after your Submit actions. First action erases the field which is used for editing Second action makes sure you are starting a new DB record bbv attached the following image(s):
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
But if you want to return from this page, then everything is even easier: just add an action "Close Subpage"
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
bbv,
Thank you - you make it look so easy.
Kind regards,
Ian Wibberley
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
Sorry bbv,
I must have done something wrong - it still writes the contents of the edit field into ALL of the existing records.....
Regards,
Wibbs
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
Yes, I didn't notice it. The short answer: this is because you didn't actually follow the DB video, but have tried to do something quickly. This is not forbidden, but then you need to understand more. You are currently loading all records on reload, because you didn't implement a database WHERE statement. An Update Node action which doesn't specify number of record you want to modify will modify them all at once. If you want to stick to your design and only get the things done, then replace the Update Node with Append to Node. This adds a new row with entered value (see image) But everything will look a lot simpler if you take time and actually replicate the logic of the video. You do not need then to use the PERSISTENT tree - you can directly work in DB2 tree which avoids all this copying of data. bbv attached the following image(s):
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 9/13/2023(UTC) Posts: 8 Location: Boston Thanks: 4 times
|
bbv, Many thanks for this.
Unfortunately that is the method I learn things - in order to understand a system I have to use it. 99 times out of 100 can I get there on my own, however, occasionally, such as now, I get stumped and have to ask for help. As a complete newbie to your system and methodology I found the videos you provide very helpful but the example used feels more of an intermediate nature which (for me) obfuscates the basics. This is the first time forme using XML directly with databases so it iśa steep learning curve, but one I will overcome.
Many thanks for all your help and patience,
Ian Wibberley
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
Feel free to ask again if your learning method brings you to another dead end.
|
|
|
|
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.