Can you provide just a little more detail about how you "Tag" them? Is this setting a value in an existing record in the portal or are you creating a new related record in this portal?
On my contact management layout I have a portal to the Subscriptions table. The portal contains two fields: subscription and a date stamp. The subscription field is a drop down with the various subscriptions: Newsletter, Nov Solicitation Letter, etc...
So when I do a Find for a group of contacts, I then go to the subscription portal and choose "Newsletter" then go to the next record and choose "Newsletter" and continue until done. The problems is where there are 100's of people to do, it is tedious.
I am trying to automate that function.
I'm sorry but that did not answer my question. Does this action update an existing record in the portal or are you creating a new record in the portal? There's a way to do the first via replace field contents on a different layout, but not the second--a different method than replace field contents would be needed.
The key visible difference is whether you are finding an existing row of data in the portal and changing a value in the field or entering data in to a new blank row in the portal.
Sorry Phil, I am creating a new record in the portal.
Then you will need to use a different method than replace field contents.
After performing the find--which can be a scripted or manual find, to produce a found set of parent records, a script can loop through the records and create one new related record in the portal's table for each record in your found set.
The exact script can vary a bit with the version of FileMaker that you are using. THis script should be one that you can adapt to nearly any recent version of FileMaker by using your field names in place of mine.
Say that you have these tables and relationships:
People::__pkPeopleID = Subscriptions::_fkPeopleID
#after performing your find....
Go to record/request/page [first]
Set Variable [$PeoplieID ; People::__pkPeopleID ]
Go to layout ["Subscriptions" ( Subscriptions) ]
Set Field [Subscriptions::_fkPeopleID ; $PeopleID ]
#Put any other set field steps that you need to assign values to this new record here
Go to layout [original layout]
Go to Record/request/page [next ; exit after last]
With FileMaker 13, you also have the option to use the new "list of" summary field to get a list of the __pkPeopleID values of your entire found set and copy it into a variable. Then the loop shown above can be modified to loop through this list of values without changing back and forth between layouts for each new record created.
That worked great. One other question: I would like to have a pop up appear at the start of the script with a warning message that gives the user the opportunity to continue or abort the script. I used the Show Custom Dialog command but how do I get the script to abort if the user clicks cancel?
Never mind Phil, I got the script to abort with the Get function.