Paolo Posted October 2, 2003 Posted October 2, 2003 I have two files and a relationship between them. (That's quite common ) I need to display records in a tree view. In other words I want to see main records and, under each main record, its related records, like this: RECORD A _____REL RECORD A.1 _____REL RECORD A.2 RECORD B _____REL RECORD B.1 RECORD C RECORD D _____REL RECORD D.1 _____REL RECORD D.2 _____REL RECORD D.3 _____REL RECORD D.4 it's easy in preview mode. I want to do that in browse mode. Thanks in advance for any help...
Anatoli Posted October 2, 2003 Posted October 2, 2003 Use list from first file and portal from second file. Exactly as it is in your diagram. The only thing is, that the portal size is not dynamic, but that shouldn't matter in browse mode.
Paolo Posted October 2, 2003 Author Posted October 2, 2003 >that the portal size is not dynamic this is a problem! Because I have to show always all the records from the related file. And these record can be from 0 to many... I'm thinking about storing main and related records in a single file. But breaking relational rules for an interface issue is my last option...
Ugo DI LUCA Posted October 2, 2003 Posted October 2, 2003 Hi Paolo, Seems to be a one to many. Set the portal in the "many" file so that you can build a portal there with "Foreign_ID" for your Main_ID and let the records relate to that field. If it is a many to many relationship, you can do this easily in the line item, where all relationships are. You can also create a table to join A and B even if it is a one to many. Then use that table to display the results in a tree-like portal. There are lots of solutions which doesn't require you break relationship rules.... Also check a sample called "Line Item in Folders". It does show a tree-like portal.
Paolo Posted October 9, 2003 Author Posted October 9, 2003 RE: Also check a sample called "Line Item in Folders". It does show a tree-like portal. "Folderized line items"... Great sample! But... you actually broke relational rules!! : You should have one file for items, one for orders, one for customers and so on... I don't crearly uderstand your souggestions on the first part of your message. However I will not use a portal, but a simple list view. Thank you...
Ugo DI LUCA Posted October 9, 2003 Posted October 9, 2003 Ciao Paolo, you actually broke relational rules!! : You should have one file for items, one for orders, one for customers and so on... The demo breaks the rules, because it isn't a real Line Item with its related files around. It's a fake. But in the "real life", it stays perfectly related to the other files (Products, Quotes, Customer Orders, Deliveries, Invoice) and even a link to the Purchase Orders. The only difference is that all items are scripted rather than entered though a portal with "allow creation of related records". Another is that along with the item being entered in that Join File, the Foreign Key is entered twice : Once in an empty "line" Once in association with the Items. This way, I can have a tree-like display...and all fields are indexed, even those related calculations. For the rest, it is perfectly keeping the Relational Rules. I don't crearly uderstand your souggestions on the first part of your message. If you are dealing with a Many to Many, you certainly have a Join File. This file holds all the Ids you need for the job. I was just suggesting you create your Tree-Like view in a Join File, or create one if you don't. However I will not use a portal, but a simple list view. It was and stays a suggestion.... PS: Non tante novita in questo Cersiae. Ci ho fatto una breve aparizione Martedi, purtroppo, avevo molti impegni. Ci vedremo per forza un giorno o l'altro.
Paolo Posted October 10, 2003 Author Posted October 10, 2003 Thank you for your suggestions. I appreciate them very much! Ciao.
Recommended Posts
This topic is 7985 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