Carole Chaski Posted March 7, 2007 Posted March 7, 2007 What am I doing wrong? I have a list (created via the list function) of documentIDs. I want to script a search so that each record with the documentIDs is found (then that found set will appear in a portal in a related table). My script (loosely coded here) Set variable ($DocumentIDs =list) Set variable ($loopCounter = 1) Set variable ($stopLooping = valueCount($DocumentIDs) Enter Find Mode Loop set field docID GetValue($DocumentIDs, $Counter) new request set variable ($loopCounter = loopCounter + 1) Exit Loop if $loopCounter > $stopLooping End Loop Perform Find I am getting really wierd results, even though when I monitor the values, teh seem to be creating the correct docIDs for the find. Help! and blessings, Carole
mr_vodka Posted March 7, 2007 Posted March 7, 2007 (edited) You do not have to do all of that. Take advantage of the power with relationships. Set a global text field with your list values. Set Field [ gKey; List ( documentIDs ) ] Create a new relationship from your gKey field to the documentIDs field of a table occurence of your child table. Now set the portal to reflect this new relationship. Edited March 7, 2007 by Guest
Carole Chaski Posted March 7, 2007 Author Posted March 7, 2007 Sorry if I am being dense, John. In Table 1, each record is for one documentID. This table is related to Table 2 which has the portal in it. I want to show in the portal only those records which are in the List. Each portal row has to show only one record/one item from the List. So I tried to set up a relationship between the documentID in Table 1 and the List in Table 2; even though documentID is contained in the List, too many other records show up in the portal. So I figured if I just had a small found set which matches the List in Table 1, then I can relate documentID to documentID and get only the List set in the portal in Table 2. I don't understand how a global field works in this scenario--again sorry for being dense.
Carole Chaski Posted March 7, 2007 Author Posted March 7, 2007 Thanks, John...after working with this a bit longer, I figured out what you were telling me, so muchas gracias, many thanks! You offered a much more elegant solution based on relationships which I didn't think was possible! blessings and gratitude, Carole
mr_vodka Posted March 7, 2007 Posted March 7, 2007 Hi Carole, By setting the global field to a list of the IDs that you want viewed, you are creating a Multi-key field Refernce Link 2
Recommended Posts
This topic is 6528 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