Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - How To - Basic Idea
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00878125
Message ID:
00878140
Views:
20
I would put ALL questions in a single table with a second field as the PK. In a second table, I would have a PK field, a FK field that stores the PK value of the Questions table, and a third field with the FK of the PK value from the Questions table that is the followup question. You would have a record in this child table of every followup question:
Questions:
1  Question one
2  Question two
3  Question three
4  Question four
5  Question five
6  Question six

ChildTable [Q - PK of the Main Question, F - PK of the followup question]
PK Q   F
1  1   2
2  1   4
3  3   4
4  3   5
5  5   6
I leave it to you to figure how to determine what initial questions to ask. Maybe a third field [logical] in the Questions table to indicate a question to be presented initially.

>Normally, I don't ask questions here until I've given a good self effort to figure something out. In this case, I'm stumped with were to even begin. I need to prompt the user for some information in the form of questions. Based on the answer the user gives, I need to be able to branch to a different question or stop right their. I'm sure your all saying, "what the problem". It's just me. I don't know the right way to layout the database table to support this type of decesion making. If anyone has some thoughts, suggestions, articles, I would appreciate it.
>
>Thanks in advance
>
>Kirk
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform