Heathbo Posted February 24, 2005 Posted February 24, 2005 Is there a way to create a portal that shows data from two seperate tables. This is what I'm trying to do. I have a table titled builder with a portal. There are two other tables. One is titled Collection. The other is titled DataFiles. Users transfer records from the Datafiles (which is a database of all posible records) into Collection (which is actually what they have). What I need is a way to bring data from Datafiles and Collection into the portal in Builder, and have an icon that tells the user that this record is not in thier Collection. I hope this doesn't confuse you. Any help you can give is much appreciated.
BrentHedden Posted February 25, 2005 Posted February 25, 2005 It would probably be better to have two separate portals, side-side side. But, I can see the reason having all in one. I suppose you could "trick" it by using calculated fields. The first table will have to have a small collection of calculated fields that "display" the information needed from the second table. You'll also have to have a relationship in table 1 that links someway to table 2. Then build the portal based on the first, displaying the fields you desire. I've never tried this, but it seems reasonable enough to work. The drawback is that you can't enter into the "calculated" fields from the portal, so any data changes will have to be done a different way.
Heathbo Posted February 27, 2005 Author Posted February 27, 2005 How would I do it if it was two portals? I guess the second portal would tell you if the record is in collection or not. How would I do this?
Heathbo Posted February 28, 2005 Author Posted February 28, 2005 I suppose I could have two portals, one from Collection and the other from Datafiles. I already have a numbering system set up for the portals. The question is though, how do I make sure the numbers in both portals match up and stay matched? If a user changes the first number, the number in the other portal has to change as well. Is there a calculation I could use? Any help you can give is much appreciated.
aaa Posted February 28, 2005 Posted February 28, 2005 You dont need the file Collection. In the Datafile create field Choosed which shows 1 if this record choosed to collection,0 - if not. Creat in Builder file two calculation fields: Chosed=1,Not_choosed=0. Then creat here two relations based first: on Choosed ----->Choosed, and second: Not_Choosed------>Chosed. Then create coresponding portals. And you will see what records choosed - in first portal and what records isn't choosed - in the second portal.Even if you make ::Choosed filed in portal as check box you will after checking on any record how this record go's to other portal.
Heathbo Posted February 28, 2005 Author Posted February 28, 2005 Thats a great idea and it would be a lot easier than the way I've been doing it. Unfortunately, due to reasons outside of my control the Collection and Datafile has to remain seperate files. Is there some way in Builder to ensure that the two numbers equal the same even after another selection is made?
aaa Posted March 1, 2005 Posted March 1, 2005 At this case you can do the next: 1. Any Datafile record must Have unique key Let this field be Key 2. When record go's to the Collection it have the same field Key 3. Create relation between this two files by Key Datefile----->Collection let his name is RelationDtoC. Here you must check "when deleting delete related record two" 4. In Datafile create field, wich shows are this record choosed in Collection Choosed=Case(isempty(RelationDtoC::Any_Field),0,1) 5.Now We must create portals a)....In Builder file create field Const=1 ....In Collection file create field Const=1 c)....Create relation Builder--->Collection by Const d)....Create relation Builder--->Datafile by Const<--->Choosed e)....Create two portals on this two relations. Now in portal for Datafile you must show Choosed as check box and if you delete some record from the other portal the check box in the Datafile portal will show that this record is not Choosed.If some record gos from Datafile to Collection this field will show Choosed. When you deleting one record from datafile, this record will be deleted from Collections. I will be glad if this post help you.
Recommended Posts
This topic is 7212 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