Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

(Beginner) GTRR / Portal problem


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

Recommended Posts

  • Newbies
Posted

Since I'm a beginner with FM, I attempted to use one of the build-in templates for my purposes (the template is Education - Administration -> Registration). I chose the template because it has a portal each on two different layouts (connected to two different tables) and basically the portal on layout A shows records from table B and the portal on layout B shows records from table A.

I'm really sorry if this sounds all like gibberish, I'm only beginning to grasp FM. :)|

When adjusting the template to my purposes, I must have made one or several mistakes.

Now the first problem is, choosing a certain row (via a button with a script) in the portal on layout A will always take me to the first record of table B in layout B, not the one I chose.

The second problem is, choosing a certain row in the portal on layout B (via a field that is made a button with the GTRR command associated) will take me to the correct record of table A, but there the portal does no show all records from Table B that are associated, only the one I'm coming from.

I'm pretty sure I'm not making myself very clear here, sorry.

I attach the file and hope that makes things a bit clearer. Maybe someone can give me some hint where to look at to fix this. Many thanks in advance for your time and efforts.

project.zip

Posted

You've added the creation of a new window to your button logic. Change the button to deselect this option.

  • Newbies
Posted

Many thanks for your response.

I have followed up on your advice regarding the New Window (even though I would prefer to have a new window opening up, but anyway).

The button had the following script attached:

Go to Related Record [show only related records; From table: "Anmeldung Projekt ID"; Using layout: "Formularansicht - Projekte Kopie" (Anmeldung Projekt ID); New window]


I changed it to:




Go to Related Record [show only related records; From table: "Anmeldung Projekt ID"; Using layout: "Formularansicht - Projekte Kopie" (Anmeldung Projekt ID)]

The problem remains the same, though no new window is opened.

Posted

At first I thought you your relationships were incorrect, because I had this problem.

GTRR:

"Goes to the current related record(s) in a related table, except when this script step is used from an active portal row.

If this script step is used from an active portal row, and the portal's table is the related table, then the related record in that table is made current. If the portal's table is not the related table, the first related record in the found set is made current.

You have the option to view the related records in a new window. This script step requires a relationship to be in effect. "

But after tinkering with your layout I realized that your portal was fine and your script was fine. The problem is that all of the fields on your layout are not from its base table!

You are actually looking at the right record, you just need to put fields from that table on the layout.

cheers,

matt

  • Newbies
Posted

Many thanks for your answer. I hope I'm not asking too much, but could you elaborate a bit on this, I frankly don't know what to change and in which layout exactly. (Just imagine I'm a chimp.)

Thank you very much in advance!

Posted

I'm afraid I can't really follow exactly what your logic is, partly because the names are difficult. But what you are doing with your script is going to a related record on a 2nd layout, then in your next step jumping to a layout of a different table, a 3rd layout.

It is during this jump that you are losing the result of your 1st Go To Related Record; you're not specifying what record to go to when you just "go to layout"; you will just land on whatever record.

You need to add a relationship to the portal's relationship which goes to 3rd layout, but using a relationship, along that same relational line, effectively going "through" the table occurrence you had. I did that. Hopefully it's correct.

project_fej.fp7.zip

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