Page 1 of 1

Repeating data input or repeating table

Posted: Thu Apr 30, 2020 2:32 pm
by mrk
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.

Re: Repeating data input or repeating table

Posted: Thu Apr 30, 2020 3:44 pm
by Klaus
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)

Re: Repeating data input or repeating table

Posted: Fri May 01, 2020 11:36 am
by mrk
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.

Re: Repeating data input or repeating table

Posted: Fri May 01, 2020 12:29 pm
by Klaus
Ah, I see, sorry, no brilliant idea currently how to display this stuff...

Re: Repeating data input or repeating table

Posted: Fri May 01, 2020 3:19 pm
by FourthWorld
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?

Re: Repeating data input or repeating table

Posted: Fri May 01, 2020 5:16 pm
by jacque
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.

Re: Repeating data input or repeating table

Posted: Tue May 05, 2020 12:01 am
by mrk
@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?

Re: Repeating data input or repeating table

Posted: Tue May 05, 2020 4:06 am
by xyz
I think a tree might work.

Re: Repeating data input or repeating table

Posted: Tue May 05, 2020 4:44 am
by FourthWorld
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?

Re: Repeating data input or repeating table

Posted: Tue May 05, 2020 8:40 am
by mrk
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.