Jump to content
Server Maintenance This Week. ×

Go to related record from the portal is not workinggg


raluca

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

Recommended Posts

  • Newbies

Good Day everybody!

I have a "big" problem: in my database, one of the layouts contain a portal that display records form the same table. What I am trying to do is just to go to the related record in the same layout(on the right side of the layout I have the portal , and I want to display in the left side the information about the record that I will select) I created a "go" button in the portal that I set it up to a script. The script will just use the filemaker function "Go to related record", but is not workiinnngggg.....not even "Go to Record" is not working! Is there anybody that has some ideas how to make this to work? ??? : :qwery: :qwery: :qwery:

Link to comment
Share on other sites

It could be a problem with how the button is positioned -- is it completely within the first line of the portal?

The most common error is selecting the wrong relationship or the wrong target layout.

What do you mean "'Go to Record' is not working" -- are you trying to make it go to the record that matches the portal row? Are you passing the portal row as a script parameter or what?

Link to comment
Share on other sites

  • Newbies

The button it is on the very first line of the portal. This is exactly what I am trying to do, to go to the record that matched the portal row, and I don't have it as a script parameter. I created a "clone" of the table , the portal is showing information form the "clone" table, but the relation between the primary key of the main table and the primary key of the "clone" table I set it up as not not equal.....may be this is the error, but if I put them equal does not seem right to me...

Thank you for trying to help me :

Link to comment
Share on other sites

I was not able to get this to work either; so here is what I did:

Create a global field "g_Record_ID" and a relationship "Record_Detail" that matches Record_ID = g_Record_ID.

On the layout, set the detail fields to Record_Detail::fieldnames.

Run a scrip trigger to set g_Record_ID = Record_ID when the portal row is selected. Your detail info will display the related data from the record selected.

Link to comment
Share on other sites

That is an interesting little problem, and here is a simple solution.

To restate the problem:

- We have two table occurrences (TOs) of a single table, related by ID, let's call the TOs A and B.

- On a layout based on A, we want to show a portal of records from B, but we don't want the current record to show in the portal. So the relationship is based on not equal.

- A button in the portal to go to related record (GTRR) doesn't go to the related portal record. Logical, if you think about it.

Here's what you do:

- Make another TO of the table, let's call it C.

- Make a relatonship from B to C, based on ID, but this time make it EQUAL.

- Make your GTRR button based on this relationship.

A != B = C

PS: Sorry for the delayed response.

Link to comment
Share on other sites

To restate the problem:

- We have two table occurrences (TOs) of a single table, related by ID, let's call the TOs A and B.

- On a layout based on A, we want to show a portal of records from B, but we don't want the current record to show in the portal. So the relationship is based on not equal.

- A button in the portal to go to related record (GTRR) doesn't go to the related portal record. Logical, if you think about it.

I am thinking about it and it doesn't seem logical at all. A record that shows up in a portal is related, no matter how the relationship is defined. And a button defined as GTRR should go to the related record - so what am I missing here?

Link to comment
Share on other sites

My first take was that when the relationship is set to "not equal," you'd be telling FileMaker to go to a record that was not related to the one you clicked, which would logically fail. You're right, though: those records are related. Do we call this a bug?

Link to comment
Share on other sites

This is strange, but it's working for me now as well. I swear the first time I tested it, it didn't go to the related portal record. Thank you for catching that, Michael.

Restated: in my ABC example, a button that goes to related B or C will work. Maybe the original problem was that the button was set to go to related A.

Link to comment
Share on other sites

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