Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
11
Erster Beitrag:
vor 7 Jahren, 11 Monaten
Letzter Beitrag:
vor 7 Jahren, 11 Monaten
Beteiligte Autoren:
Andrew, Arie, Giu, Peter H., Al, Andrew.pcs.crosspost

What is the best way to structure this scenario?

Startbeitrag von Andrew.pcs.crosspost am 29.07.2010 11:14

Hello
I am new to WinDev.

Scenario:

There are 50 subjects to choose from in a drop down or list.
Each subject has between 3 and 5 areas to choose from but you can only choose one area - So can use radio button or drop down to select.
The area they choose will have up to 6 tasks that have to be completed. All tasks must be completed but in any order - so Use hatch box to mark a completed task.


What is the best way to structure this?

I may in the future need to add more subjects.

Do I need (is it easier) to do seperate analysis for each of the 50 subjects? As potentially there are about 1500 choices.



Any helpful advise would be greatly appreciated.
Like I said at the start, I am new so please try and keep the explanations simple :)

Thank you

Andrew

Message forwarded from pcsoft.us.windev

Antworten:

Hello Andrew

From your brief description, this is not specifically a Windev issue, it is a data design issue.
At a minimum you would need 3 linked main files and one separate link file.

"Subjects" is the parent file with an "Areas" file attached in a one to one relationship and then the "Areas" file functions as a parent to the "Tasks" file in a one to many relationship
The primary key of the parent records become foreign keys in the child records to create the links.
Use the separate link file to establish connections between a subject and the possible areas, and when a specific area is chosen it is the only one linked to the subject file. The same process could be used with another separate file to connect possible tasks to areas for selection if you need to limit the tasks presented for selection.
This structure would support any number of subjects, areas and tasks.

You could use 3 linked tables for the selection mechanism. The first table displays the subjects, a second linked table shows the possible areas per subject and the third table displays the tasks available per area.


Regards
Al

von Al - am 29.07.2010 11:47
Haven't read your scenario in very much detail, but it looks like you need a parent/child releationship with a reflexive link to itself.

This means you could hold the structure in one file with a parent/child relationship.

Visually you can display this in a tree structure.

Cheers,

P.

von Peter H. - am 29.07.2010 12:24
Hello

Thank you all for replying.
Yes I see that my description is not very good and I mean't seperate files not seperate analysis!



Each subject has 3 - 5 areas. These areas are different for each subject. Each area is different for each subject.
So each combination will be unique.

Example:

Subject:
DOGS
PLANTS

You Choose PLANTS:

PLANTS Areas:

a)COLOUR.
b)HABITAT.
c)PARTS OF.

You Choose PARTS OF:

Tasks: (complete all)
1)Draw a Plant.
2)Colour in.
3)Label.


With the above example would I now need to create a File for each Subject with the choices listed in the Subject file?

Thank you everyone for helping this newbie :)

Andrew


Quote
Andrew.pcs.crosspost
Hello
I am new to WinDev.

Scenario:

There are 50 subjects to choose from in a drop down or list.
Each subject has between 3 and 5 areas to choose from but you can only choose one area - So can use radio button or drop down to select.
The area they choose will have up to 6 tasks that have to be completed. All tasks must be completed but in any order - so Use hatch box to mark a completed task.


What is the best way to structure this?

I may in the future need to add more subjects.

Do I need (is it easier) to do seperate analysis for each of the 50 subjects? As potentially there are about 1500 choices.



Any helpful advise would be greatly appreciated.
Like I said at the start, I am new so please try and keep the explanations simple :)

Thank you

Andrew

Message forwarded from pcsoft.us.windev


von Andrew - am 29.07.2010 13:25
Andrew,
you don't need a file for each subject. You even can't, asuming you don;t know al subjects yet. That's for the user to define them.

you need 5 files.
1 for subjects
1 for areas
1 for tasks
1 extra file to store the 1-to-many relations between subjects and areas, ie: subjects_X_areas.fic
1 extra file to store the 1-to-many relations between areas and tasks, ie: areas_X_tasks.fic

look at the help for "Analysis links" and then "Types of link". This will explain things.


von Arie - am 29.07.2010 14:08
Thank you Arie

Yes I already know the subjects.

These will be already defined along with a description filled in and can't be changed by the user. A kind of training schedule. It will log which they have done.

Andrew

von Andrew - am 29.07.2010 14:32
OK, but I still would use the scenario I mentioned. And distribute the subjects-file (filled by you already!) together with the application. Then you can use this file as a source for all kind of controls and/or reports very easy.


von Arie - am 29.07.2010 14:49
Thank you Arie

I think I understand.

Instead of having 50 files one for each subject and linking them to a Subject list.

1) 1 have one file listing the 50 subjects.
2) 1 file listing the 250 different Areas.
3) 1 file listing all 1500 different Tasks.
4) 1 file to link the Subject to it's Areas.
5) 1 file linking the Areas to all it's different Tasks.

Andrew

von Andrew - am 29.07.2010 15:55
Andrew, congratulations. You passed your first WD-test.
I would create the analysis now, make a backup and do a full RAD. Just to study the results and see how files are linked to controls.
Personally I never use RAD but always build my own windows. Because I find the RAD-solution not (end)user friendly. As do most of the developers I believe.
I would also take the time to do the tutorial once and study the examples supplied with WD.

von Arie - am 29.07.2010 16:26
Thank you Arie

Now all I have to do is type it alllllll in!

Andrew

von Andrew - am 29.07.2010 16:34
Quote
Andrew
Thank you Arie

Now all I have to do is type it alllllll in!

Andrew


Anybody told you thath it's a fun task :D

von Giu - am 29.07.2010 18:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.