nick_jp Posted August 12, 2007 Posted August 12, 2007 Hi, I have a table "Projects" and another table "Issues". The idea is to have many issues entered for each project, so there is a one-to-many relationship. I made a issue layout, with a drop down list box to select which project the issue would be for. But, the list only displays 3 projects, even though I have defined about 7. I have set the list to "display all records". Currently there are no other TO's in the relationship between Project and Issue. There is a customer table, and each customer will be able to have many projects. But that table hasn't been added to the relationship. I have tried making another TO of the Project table that is not in the relationship, and I still can't see all the projects. Am I trying to do something wrong by allowing a child to chose it's parent? I've spent an hour banging my head on the screen, if someone has a suggestion that would be great.
Søren Dyhr Posted August 12, 2007 Posted August 12, 2007 But that table hasn't been added to the relationship. I have tried making another TO of the Project table that is not in the relationship, and I still can't see all the projects A carthesian type of relationship, comes to mind here, but as such isn't dependency of the TO it made from an issue, before a relation defines a dynamic buildup of it. But there isn't much point in making a dynamic value list on a carthesian relation, since it never reflect user interactions. It's not quite obivious what you're after here, should the previous selections strain the availibility in the popup list? Next issue that makes me wonder, is when ever I encounter a grandparent type of hierarchical structure - shouldn't it instead be a one to many recursive structure?? http://jonathanstark.com/recursive_data_structures.php --sd
LaRetta Posted August 12, 2007 Posted August 12, 2007 I may be missing the point. But if you want the dropdown to show an option of ALL projects, simply base your value list on values from field and ALL values based upon your Projects table. If you choose projects from your Issues table, it will only include issues currently residing in records in your Issues table and if you base it upon Projects and only related projects to Issues, it won't display all projects either.
Søren Dyhr Posted August 12, 2007 Posted August 12, 2007 (edited) Ah yes!! I think LaRetta nailed the mistake here, which of course is it to build the list upon values in the other table not on the ones already being entered! The other thing about the graphing is that the graph must not be confused with a ERD, several TO's are going be duped usually - since circular relations isn't posible with the RG. --sd Edited August 12, 2007 by Guest
nick_jp Posted August 13, 2007 Author Posted August 13, 2007 (edited) [color:black]Thanks for the replies. I think I'm trying to do something that goes against the grain of the relationships defined in the DB. Each Customer can have many projects, and each project can have many Issues logged. I had been trying to create a new issue and THEN select the parent record project. Am I going to have to use portals to get something like this to work? IssueTracker.zip Edited August 13, 2007 by Guest
Søren Dyhr Posted August 13, 2007 Posted August 13, 2007 (edited) Don't attempt to modify the primary key of a record not yet linked. Set instead the foreign key to a value found among the primary keys. I've changed your file ever so slightly - what you attempted to do might be possible occationally, but what about the other record previously linked to this primary field ...they will then become orphans, since you're modifying data in a record a relation away. --sd IssueTrackerMod.zip Edited August 13, 2007 by Guest
nick_jp Posted August 14, 2007 Author Posted August 14, 2007 Hi Soren, Thanks for looking at this. There are 6 records in the Project table. 2 each for client ID 1, 2 & 3. However you can only see the projects for client 1 & 2 in the list box. Why is this?
Søren Dyhr Posted August 14, 2007 Posted August 14, 2007 Sorry I didn't see that, you can't in my huble opinion have Project title as a numeric field, you would then only get first occurence of each number somewhere in the text show up in the popup ...your method is slightly unorthodox, lookup next higher seems a more obivous choise if you need this kind of jiffy logic No! instead rush to your fields definition and redefine the field to text, it makes more sense to the rest of us! --sd
nick_jp Posted August 14, 2007 Author Posted August 14, 2007 ROFL, I hadn't noticed that. Thanks man,
Recommended Posts
This topic is 6649 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now