AAHH Posted November 8, 2004 Posted November 8, 2004 I have been trying to display the results (report) of a found set in Table 1 while using a layout and portal in Table 2. Using the same layout in Table 2, when displaying all records in Table 2 and all associated records from Table 1 (through a portal), I have no problem. Is there a way I can get the layout in Table 2 to recognize the Find that I did in Table 1? (and thus display a partial of the "all records in Table 2 with portal of all records in Table1"?) The tables are related by "id Rec". Table 1 is indexed on "id item" while Table 2 is indexed on "id Rec". (Table 2 "id Rec is one to Table 1 "id Rec" many). No matter what I have tried, I keep getting "all records in Table 2 with portal of all records in Table1". What I want is to display (report) all "id rec" associated with the Table 1 find and all associated "id item" for each "id Rec" through the portal. Clear as mudd right? I think I explained it right, but feel free to ask for clarification. Thanks in advance for any help. Best regards
-Queue- Posted November 9, 2004 Posted November 9, 2004 Create a layout in Table 1 that contains only the serial (id Rec) and a relationship from a global text field in Table 2 to the serial in Table 1. Once your find is performed, add Go to Layout [serial only] Copy All Records Go to Layout [one containing Table 2::globaltextfield] Paste Commit Records/Requests Go to Layout [Table 2 with portal to Table 1] Make the portal based on the Table 2::globaltextfield to Table 1::serial relationship.
AAHH Posted November 9, 2004 Author Posted November 9, 2004 Hi Queue: Thanks for the reply. I apologize, I am a mess. I am not a programmer and I am still confused and cannot get it to work. I think I might be confused by your terminology. Please confirm that I understand correctly (on a step by step basis) 1. Create a generic layout in Table 1 (GLT1) such that the only field in it is "Table 1::id Rec" (maybe should be "id item"??) 2. Create a global text field in Table 2 (g_serial) 3. Create a relationship between "Table 2::g_serial" (one) to "Table 1::id Rec" (many) (maybe should be "id item" as there is already a relationship ("id Rec" relates Table 1 and Table 2) "g_serial" and "id Rec"??) 4. Create a generic layout in Table 2 (GLT2) such that it contains "Table 2::g_serial" and "Table 1::id Rec" 5. Go to GLT1 6. Copy [select entire contents] 7. Go to GLT2 8. Paste [select entire contents] 9. Commit Records/Requests (this confuses me - am I adding records to Table 2?) 10. Go to Layout [Table 2 with portal to Table 1] For whatever reason, I think I have this pretty hosed up. Again, I apologize. I would be enormously grateful if you could help me straighten this out. Thanks and Best Regards - AAHH
-Queue- Posted November 9, 2004 Posted November 9, 2004 If id Rec is your serial, then use that; if it's id Item, then use that. Basically, I'm saying to use whatever field is the unique identifier for each record. This is the field that we want to copy en masse and paste into the global so that each record in Table 2 will be related to all records in Table 1 whose serial is in the global. You're good up to step 4. The layout doesn't have to be in Table 2. It can be in Table 1 and contain Table 2's global. Globals are accessible from all tables even if a relationship is not defined to the table. This layout doesn't need Table 1::serial, only Table 2::g_serial. Step 6 should be Copy All Records. This will copy every serial in the found set, once you are on GLT1. When you Paste into the global in step 8, it will result in a carriage-return (
Fenton Posted November 9, 2004 Posted November 9, 2004 That's Copy All Records, not plain Copy. Very different. Copy All Records copies every field of every record on the layout. In this case, just 1 field. A couple more bits. Copy All Records normally requires Export privileges, in Accounts and Privileges. This may conflict with your security scheme. A work-around is to create a modular script that only does this Copy All Records routine, and check the box to [x] run script with Full Access. Then you don't need Export privileges. CAR.zip
AAHH Posted November 9, 2004 Author Posted November 9, 2004 Thank you gentlemen! I got the general process to work and am now refining. Best Regards - AAHH
Recommended Posts
This topic is 7582 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