Jump to content

Newbie Portal Filter Question


tDot

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

Recommended Posts

I have searched the Portal Forums, and can't find an answer I can make sense of. If there is an answer to this question...please point the way. My question:

I have 3 Files: Assignments/Questions/Criteria. These are Parent/Child/Grandchild respectively. In a Parent Record layout I want to have 2 portals: Questions (related by Assign_ID) and Criteria (which is related to Question file by Question_ID). The behaviour I want is click on a row in the Questions portal and see all related Criteria in the other portal. I gather from other posts that I need to create a Global field in the Assignments field which would be the left side of a relationship with some kind of calc field in the Criteria file. Can someone please guide me in creating the necessary calculation fields and relationships, and also: I expect I will have to create a button over the Question portal row that will set the Assignment Global field to the (Question_ID?)...I just don't know how to tell the script to use the row I clicked on??? Many thanks to the kind soul that helps!

Sheesh! My head is spinning now confused.gif

Link to comment
Share on other sites

It's late and I hope I'm interpreting your question correctly...

My way to solve this->

In Assignments, in the Questions portal, make a button from a rectangle with no fill or lines, size it to fill the portal row, and bring it to the front.

Make a script for the button, first do a Go To field (any field in the first portal, this is needed because there are two portals on one layout and FM needs to know which one you want to use). Note that the field does not have to allow entry. Next step is to GTRR (Go To Related Record) using the Questions portal's relationship, and finally set a global in Assignments with the value of Question_ID from Questions. The second portal's relationship is from this global to Criteria::Question_ID.

Hope you don't get too dizzy...

Let us know if this isn't clear enough.

Link to comment
Share on other sites

Thanks Cyborg Sam,

Yes, you've nailed it...many thanks. It is working now, but with one small hitch: The portals work great if I manually enter the Question ID in the Assignment Global (number) field...BUT

...The script to set the global number gets to the GTRR step OK, but it is then setting the Global to the wrong Question_ID (it is using the one from the FIRST portal row, not the portal row I clicked on to trigger the script...must be something simple I'm missing?

Link to comment
Share on other sites

First, make sure the Set Field step is after the GTRR step. If it is, check to be sure that the fields in the portal use the same relationship as the portal itself. if so, then you may have the wrong relationship for the GTRR. The GTRR script step uses the same relationship as the portal. This relationship goes from some field (Assign_ID?) in Assignment to Assign_ID in Questions, I'll call it Questions. So the script step is: Go To Related Record ["Questions"]

Set the global in Assignments using this same relationship: Set Field ["gQuestion_ID", "Questions::Question_ID"]

The Criteria portal has the relationship from gQuestion_ID in Assignments to Criteria::Question_ID.

If you are using the correct relationships, check them to make sure the field names are set to what they should be. Also, if the Relationships have their "Sorted By" checked, make sure the sort fields have been entered and are still valid.

If none of this works, I'll have to switch to a thinking cap from my dunce cap...

Sam

Link to comment
Share on other sites

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