Jump to content

Can't get Go to related record script to...


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

Recommended Posts

I have put a button in a portal set to perform a script that goes to the related record in another file. I want the file containing the portal to toggle to hide when it goes to the related file/record, but the script only seems to work correctly when "go to related record" is the only step in the script. When I try to add toggle or enter "go to related record" as a subscript, it goes to the related file OK, but goes to the first related record, not the one in the portal row I selected. What am I doing wrong?

Link to comment
Share on other sites

It's because many of the things that you can do in a script will cause the portal to be de-selected. Then, the default related record will not be the one you had selected, but the first one found, which happens to be the one in the first row. If you have to perform other steps before you go to the related record, you can set a field in the main file to a unique record identifier field in the related file using the Set Field command as the first step in your script. Then, use that field as the basis for a second relationship to the related file. When you go to the related record based on this relationship, there will only be one record, so there's no confusion.

[ November 09, 2001: Message edited by: BobWeaver ]

Link to comment
Share on other sites

This topic is 7284 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
 Share

×
×
  • Create New...

Important Information

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