Repeating data input or repeating table

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mrk
Posts: 21
Joined: Mon Apr 03, 2017 6:16 am
Location: Perth, Western Australia

Repeating data input or repeating table

Post by mrk » Thu Apr 30, 2020 2:32 pm

Hi all
I am trying to design a form that contains information about a job and is going to be stored within a database. Capturing the basic data is fine, where I'm running into issues is I need to be able to add multiple Step/Sub Steps/Sub sub steps (if that's a real term).
The data is really a Parent/Child relationship, I have the DB design worked out and could do something like this in MS Access but I need this to work on mobile devices, other development tools I have looked at call it a repeating table but they fall down when you have a repeating table in a repeating table. The attached image is a very rough outline of what I would ultimately like to achieve (just the repeating part).
Any pointers would be appreciated.
Attachments
form.JPG

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Repeating data input or repeating table

Post by Klaus » Thu Apr 30, 2020 3:44 pm

Hi mrk,

hm, this IS in fact a question of DB design! 8)

I would use 3 tables with these fields:
1. "main"
main.ID (1 to N) -> int NOT NULL AUTO_INCREMENT
main.description

2. "steps"
main.ID -> relation to "main"
steps.ID
description of steps1 to N (if neccessary)

3. "substeps"
main.ID -> relation to "main" (optional)
steps.ID -> relation to "steps"
substeps.ID
description of substeps1 to N (if neccessary)

This way you could add steps and substeps until the cows come home resp. your machine explodes! :-)
You get the picture.


Best

Klaus

P.S.
I hope I understood your problem correctly! 8)

mrk
Posts: 21
Joined: Mon Apr 03, 2017 6:16 am
Location: Perth, Western Australia

Re: Repeating data input or repeating table

Post by mrk » Fri May 01, 2020 11:36 am

Hi Klaus

Thanks for the reply. The DB design isnt my problem, what is am wondering is how to best create/display this kind of input form and if it is possible.
I realise there will be a requirement for CRUD functions but i think ill be okay with these, it more how would one display the information in a user friendly format. A data dump or table upload wouldnt look "nice"
Sorry if i misrepresented my question.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Repeating data input or repeating table

Post by Klaus » Fri May 01, 2020 12:29 pm

Ah, I see, sorry, no brilliant idea currently how to display this stuff...

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9838
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Repeating data input or repeating table

Post by FourthWorld » Fri May 01, 2020 3:19 pm

mrk wrote:
Fri May 01, 2020 11:36 am
The DB design isnt my problem, what is am wondering is how to best create/display this kind of input form and if it is possible.
Does everything need to be on screen at the same time? Might the workflow lend itself to a wizard-like approach where the user is guided through the inputs screen by screen?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Repeating data input or repeating table

Post by jacque » Fri May 01, 2020 5:16 pm

Do the repeating parts always have the same number of steps? That is, does step 1 always have 2 sub-steps, etc.? If so, you could set up groups that display sequentially. If not, you could still do the same thing but would need to create the groups dynamically in script. Android has a convention for this you could emulate.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mrk
Posts: 21
Joined: Mon Apr 03, 2017 6:16 am
Location: Perth, Western Australia

Re: Repeating data input or repeating table

Post by mrk » Tue May 05, 2020 12:01 am

@FouthWorld - I have thought about that but, the traditional paperwork is basically just a page with a table on it and the people who use it are used to that format, however, i don't think that presenting the data in that format though a digital format would work well, especially given that the users should be able to edit the fields previously entered. Once completed, they need to see all steps in sequence so something similar to a table layout may be what is needed.

@jacque - no the steps don't always have the same number of sub steps. I dont suppose you have an example or link to the android script?

xyz
Posts: 30
Joined: Sat Feb 29, 2020 4:45 am

Re: Repeating data input or repeating table

Post by xyz » Tue May 05, 2020 4:06 am

I think a tree might work.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9838
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Repeating data input or repeating table

Post by FourthWorld » Tue May 05, 2020 4:44 am

mrk wrote:
Tue May 05, 2020 12:01 am
@FouthWorld - I have thought about that but, the traditional paperwork is basically just a page with a table on it and the people who use it are used to that format, however, i don't think that presenting the data in that format though a digital format would work well, especially given that the users should be able to edit the fields previously entered. Once completed, they need to see all steps in sequence so something similar to a table layout may be what is needed.
Does the printed form look like the image above? Why not use that?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mrk
Posts: 21
Joined: Mon Apr 03, 2017 6:16 am
Location: Perth, Western Australia

Re: Repeating data input or repeating table

Post by mrk » Tue May 05, 2020 8:40 am

Yes ideally it would look something like the above tree.
I suppose what im trying to workout is how to programatically create and associate the "fields" when the user requires them.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”