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

Select a line in a portal to list items in another portal


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

Recommended Posts

Posted

I have a portal on a layout listing ID number (that can't be changed) and other fields that I can change whilst viewing each customer.

Is it possible to select a line in the portal to display addition information in another portal on the same layout

Posted

Since you are on version 9, you will have to set a global field with the ID of the selected record in your first portal. Then the relationship for the second portal should be keyed on that new global field to the corresponding child ID for the table occurrence of the second portal.

Posted

Sorry, haven't updated my status, i'll do it now, i'm on FM pro 12

Posted

Well then you can use filter portal option to do the same thing using a global variable as the selected ID. Your script will need a step to reresh the portal such as a refresh script that flushes the cache or setting of a field in the relationship that causes the refresh.

Or you can still use the previous mentioned technique.

Posted

Well then you can use filter portal option to do the same thing using a global variable as the selected ID. Your script will need a step to reresh the portal such as a refresh script that flushes the cache or setting of a field in the relationship that causes the refresh. Or you can still use the previous mentioned technique.

Thanks mr_vodka, I have tried to work through this but I need a bit more advice as I'm not sure on how to pass the selectedID in the first portal

to display the results in the second portal

Posted

Here is an example of a portal selection allowing a second portal to be filtered. I have included all 3 scenarios where one can use a relationship to filter ( pre FMP11 days ), and 2 ways to refresh a filtered portal for those that have FMP11 and above.

This is a fp7 file so that those that do not have FMP12 can make use of it. You can easily convert it since with 12.

portal_filter_portal.zip

Posted

Thank you so much for that, I can see how it all works now, what are the advantages and disadvantages to the 3 options if using FM12 as they all work fine.

Posted

Well a filtered relationship is faster with large child record sets. When using the filter portal option, it has to evaluate all the child records across the relationship and then determine which records to show afterwards whereas the filtered relationship only brings across the records that meet the criteria intially.

For those that dont have huge related children using the filtered portal option is the way to go.

As for the refresh, windows user have more flashing issues than Mac users. Its up to you which refresh method you want to use.

Posted

Hi John, coded the 2nd option into my database and spent ages trying to work out how to add new records to the 'grandchild portal' view. In the end I re-coded using the 1st option and was able to add records. Don't know why that was as I'm not that clever, but I've sort of got it working now so thanks again for your help.

Posted

See if this technique helps.

http://fmforums.com/forum/topic/72211-revisit-adding-records-to-a-portal/

Posted (edited)

And if you are attempting to create the grandchild at same time you create the child, you should reverse it and only create the grandchild (but use filtered portal with Allow Creation as John outlines). The result is that, simply by adding your grandchild, your child will be automatically created ... two records in one (no script or trigger).

http://fmforums.com/...-relationships/ please see post #16 (OK2) and Medications tab.

Yellow field at the bottom is invisible portal and there is no refresh issue since it must resolve the child to create to grandchild. These are the kinds of things that make FileMaker so much fun. :laugh2:

Edited by LaRetta

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