Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Bigwibb  
#1 Posted : Tuesday, October 24, 2023 2:48:34 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
bbv  
#2 Posted : Tuesday, October 24, 2023 3:05:48 PM(UTC)
bbv

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
thanks 1 user thanked bbv for this useful post.
Bigwibb on 10/24/2023(UTC)
Bigwibb  
#3 Posted : Tuesday, October 24, 2023 3:15:35 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
Bigwibb  
#4 Posted : Tuesday, October 24, 2023 4:18:23 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
bbv  
#5 Posted : Tuesday, October 24, 2023 4:23:18 PM(UTC)
bbv

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
Bigwibb  
#6 Posted : Tuesday, October 24, 2023 4:39:18 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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.
File Attachment(s):
tester.mtd (7kb) downloaded 4 time(s).
test.mdb (296kb) downloaded 4 time(s).
bbv  
#7 Posted : Tuesday, October 24, 2023 4:43:23 PM(UTC)
bbv

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
Bigwibb  
#8 Posted : Tuesday, October 24, 2023 4:48:17 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
bbv  
#9 Posted : Tuesday, October 24, 2023 4:50:58 PM(UTC)
bbv

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):
Capture1.JPG
thanks 1 user thanked bbv for this useful post.
Bigwibb on 10/24/2023(UTC)
bbv  
#10 Posted : Tuesday, October 24, 2023 4:52:43 PM(UTC)
bbv

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"
thanks 1 user thanked bbv for this useful post.
Bigwibb on 10/24/2023(UTC)
Bigwibb  
#11 Posted : Tuesday, October 24, 2023 5:10:33 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
Location: Boston

Thanks: 4 times
bbv,

Thank you - you make it look so easy.

Kind regards,

Ian Wibberley
Bigwibb  
#12 Posted : Tuesday, October 24, 2023 5:25:49 PM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
bbv  
#13 Posted : Tuesday, October 24, 2023 6:30:38 PM(UTC)
bbv

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):
Capture2.JPG
thanks 1 user thanked bbv for this useful post.
Bigwibb on 10/25/2023(UTC)
Bigwibb  
#14 Posted : Wednesday, October 25, 2023 10:22:57 AM(UTC)
Bigwibb

Rank: Newbie

Groups: Registered
Joined: 9/13/2023(UTC)
Posts: 8
United Kingdom
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
bbv  
#15 Posted : Wednesday, October 25, 2023 3:12:56 PM(UTC)
bbv

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.
Users browsing this topic
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.