March 7, 200718 yr 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
March 7, 200718 yr 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, 200718 yr by Guest
March 7, 200718 yr Author 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.
March 7, 200718 yr Author 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
March 7, 200718 yr 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
Create an account or sign in to comment