Jump to content
Server Maintenance This Week. ×

Go To Related Record, going to the wrong Table! (ie wrong direction)


Slater

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

Recommended Posts

Solved! Can't see how to delete this post so ...

I had thought that "Go To Related Record From" mean the records that you were going From ... turns out it's the records that you're going To!

😳 ✌️ 🥳

 

 

Hi Everyone,

Hope you can help as I've been banging my head against this one for over an hour, and I just can't figure it out!

(I'm on FMP 16)

I have two tables: People & Pictures

They're related by a relationship called People_Pics_Relationship, and in that

People::ID_Person = Pictures::ID_Person

I have a layout called "Pics" based on this relationship People_Pics_Relationship, filled with fields the Pictures Table, and a script that says:

Go To Related Records: related record from: Pics, show only related records, match all in current found set.

So when I run that script in a layout based on the People Table, it takes me to all the related records from Pictures Table, 

but when I run that script in a layout based on the Pictures Table, nothing happens. It's like it will go in the direction that I don't want, but won't go in the direction that I do want! Can someone help point out what I'm doing wrong, as I guess it's something really simple, but I just can't figure it out! I'm guessing that the layout is based in the People Table somehow, rather than the Pictures Table, but I can't figure out how to switch things around.

Many thanks

 

 

Edited by Slater
Link to comment
Share on other sites

9 minutes ago, Slater said:

when I run that script in a layout based on the Pictures Table, nothing happens

Not sure what exactly you expect to happen. The GTRR script step has a direction - or more correctly, a target table: in your example, it goes to related records in the Pictures table. If you are in a layout of the Pictures table, then there are no related records in the Pictures table, and the step does nothing. 

 

Edited by comment
Link to comment
Share on other sites

Thanks Comment, much obliged for your response.

Yeah, for the life of me I was trying to make the layout be 'based' in the Pictures Table, but I could only base the layout in a relationship (ie Show Records From: in the layout set up) but I just couldn't get that to work, it was always via a relationship.

I realised the GTRR had a direction, and that my script was going in the wrong direction. Because of the wording in the GTRR script saying "Go To Related Record From" I never played with that as it seemed sensible that this was listing the Table that I was going from. Turns out that if I set "Go To Related Record From" to the Table that I would like to go TO, then it works. That was what was throwing me, if it had said "Go To Related Record TO" I would have figured it out immediately!

  • Plus1 1
Link to comment
Share on other sites

This topic is 1132 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.