Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some help with form's design needed
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00514812
Message ID:
00514930
Views:
15
>Nadya,
>I'm a little unclear on your goals: You want the user to be able to add multiple Child records for each CustomerID. Are the Grandchild records (towns) automatically linked or will the user be choosing the actual towns for each ConfigID/Region record chosen?
>

Barbara,

First of all, thanks a lot for the reply. Yes, I want to allow user fill in Report configuration information, then add regions, say, South Boston, select towns (I'm thinking about mover's listboxes), North Shore (select another set of towns), etc.

Table design looks like:
  Config Table
       |
       Regions table
            |
            Towns per region
Your suggestion about set deleted off and reusable CustomerID field makes sense. Today I modified tables structure to accomodate my second idea, but I haven't programmed anything yet, so I can revert back to CustomerID idea.

Now I'm uncertain, how to actually design this form. What kind of interface should it be? Should I use views, and if yes, how?

Thanks again, this gives me a start.

>I would use the CustomerID as my primary key in the Parent (Report Configuration file). When adding a new record, I'd SET DELETED OFF and look for an existing record. If there is one that has been deleted, recall it and blank out all except the ID field. That way you won't have trouble with duplicate keys but will also not have trouble with getting multiple records as you might if you used a surrogate key.
>
>You could, of course, use a surrogate key as the primary key and the Customer ID as a foreign key with a Candidate index, but I've found that managing the keys in a Candidate index takes more coding than the first method I suggested.
>
>HTH
>Barbara
>
>>Hi everyone,
>>
>>I want to design form with threee tables:
>>Parent - Child - GrandChild and I'm not sure, how to proceed.
>>
>>The parent table describes report configuration. It should be one per customer (I was thinking about making CustomerID to be primary index, but user should be able to delete record and re-add, so may be CustomerID would be regular index (assuring, that there is only one record per customer and ConfigID would be primary index).
>>
>>Child table is related with config file by ConfigID and it contains Region definitions, e.g.
>>ConfigID1 RegionID1 RegionName1
>>ConfigID1 RegionID2 RegionName2
>>ConfigID1 RegionID3 RegionName3
>>ConfigID2 RegionID4 RegionName4
>>ConfigID2 RegionID5 RegionName5
>>etc.
>>
>>and the child table of this one is towns per regions, e.g.
>>RegionID1 Town1 FullName1
>>RegionID1 Town2 FullName2
>>RegionID1 Town3 FullName3 etc.
>>
>>When user invokes this form, oJC.CustomerID property is set, so user should be able to see records related to this customer ID (it they are exist) or the new empty record should be added.
>>
>>I'm not sure, how should I design this form. User should be able to fill all configuration info, then add or change regions, then add towns (say, using Mover listbox) for each particular region.
>>
>>Do you have some ideas for me to start?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform