Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6528 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted (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 by Guest
Posted

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.

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.