MariaAux

Display Find Results in a Portal

12 posts in this topic

Hi There,

I did a google search to learn more about displaying find results in a portal i.e. perform a find and only those resluts should be displayed within a portal and I found a couple of ideas. One was the concept of multi-key fields but I noticed the video was done with an older version of Filemaker. With FM 11, we have the ability to do a filter within a portal based on a calcualtion and I wonder whether there isn't an easier way now with FM11 to use this portal filter functionality to produce a portal with only the find results?

Is Multi-keys still the best way or is there a better way with Portal filters?

Thanks so much for your advice and time.

Maria

Share this post


Link to post
Share on other sites

A portal filter doesn't have any "awareness" of the found set, so it can't really help you there. A multi-key field seems like the way to do it.

Share this post


Link to post
Share on other sites

Why do you want to display find results in a portal? What's wrong with displaying them in list view?

Share this post


Link to post
Share on other sites

Is Multi-keys still the best way or is there a better way with Portal filters?

Hi Maria,

It is usually best to use relational filter instead of portal filter because portal filters have to evaluate all records before constraiining the results. This is great stress on your system when you have a lot of records. And since either way, you would need to collect the IDs of the record-set, it is best to use multi-line (global or calculation) in new relationship to the portal. Check out this thread for gathering IDs from a found set: http://fmforums.com/forum/topic/61394-found-set/page__hl__agn%C3%A8s__fromsearch__1

Hi Dan,

Sometimes it helps (when viewing a form layout of multiple records) to see a portal on the side of those same records. It acts as an visual index and can allow click-jumping to specific records within the found set. :)

Share this post


Link to post
Share on other sites

I would qualify that statement about portal filters; you can do both.

If the potential set of unfiltered records is large, then the relationship should be designed as the first filter. Portal filtering can then be used as a secondary filter.

The portal filter calculation will operate on the entire record set of values presented by the relationship. The portal filter calc operates on these records strictly in creation order, independent of how the relationship definition or portal definition sorts them.

Share this post


Link to post
Share on other sites

Thanks, Bruce. Yes, many times we further portal-filter a relationally filtered relationship. Whew! That was a bite-full!

The portal filter calc operates on these records strictly in creation order, independent of how the relationship definition or portal definition sorts them.

I did not know this! I thought this was interesting but wait ... it would not really matter since all of the related records must be walked through by the filter anyway, would it? Where might knowing that sorts are ignored by portal filters, be important? After all, we are talking about filtering and not calculating, right? Thanks for stepping in.

Share this post


Link to post
Share on other sites

Depends on what you are trying to do with the filter calc.

For instance, assume a sorted relationship to a people table, sorted by last name; where the relation uses a global field to match on City.

Set the filter field to "Seattle". Say there are 2000 Seattle people; 75 whose last names begin with "A".

Have a script that sets variable $$names to empty and then does a refresh.

The portal filter uses this calc:

Let( $$names = List( $$names; People::LastName); Left( People::LastName; 1) = "A")

What will the portal show?

(Only the 75 Seattle people whose last names start with "A"; sorted by last name).

What will $$names contain?

(The list of all 2000 Seattle last names; unsorted.)

Share this post


Link to post
Share on other sites

Or consider this variation for the filter calc:

case( Left( People::LastName; 1) = "A";

Let( $$names = List( $$names; People::LastName); 1)

)

Now $$names contains the list of Seattle last names beginning with "A"; but it is unsorted.

If instead you collected the record ID values into the variable, you might have assumed it represented a sorted list. But it won't.

Share this post


Link to post
Share on other sites

Thank you all so much for your invlauable advice. Got me where I wanted to be! Thanks a million

Share this post


Link to post
Share on other sites

Hi Dan, Sometimes it helps (when viewing a form layout of multiple records) to see a portal on the side of those same records. It acts as an visual index and can allow click-jumping to specific records within the found set. :)

I'd never heard of this interface technique before; sounds interesting. I couldn't see any practial use of displaying find results in a portal, so thanks for pointing this out.

Now you got my gears turning though... This could possibly be an alternative to using a filtered portal. It would take a lot more work on the developers end, but it would allow for greater flexability for the users 'filters'.

The portal filter calculation will operate on the entire record set of values presented by the relationship. The portal filter calc operates on these records strictly in creation order, independent of how the relationship definition or portal definition sorts them.

Interesting detail. like LaRetta, I failed to see the relevance of this at first, but your examples were interesting. I can see how this aspect of the portal filter could possibly be levereged for some cool custom feature.

Share this post


Link to post
Share on other sites

Kinda reviving an old topic but I found this intresting. I have a layout that show work orders on the left, on a portal that filter by the work order status, on the right it shows the whole record that is selected on the left portal. All good.

I also have a list layout simple because the search found most of the time contain many records and my users like to visualize all the records and find the one they need, as they usualy dont have the very exact work order ID when they need to use the search, so, using the same layout design that filters the work orders by status, but filtering to show only the found set records is actualy very usefull.

Many records found showing on a list on the left, and the whole record showing all the fields on the right.

 

Share this post


Link to post
Share on other sites

Hey Morenomdz,

Wasn't sure if you had a question there (seemingly not), but your revival of the thread provides a great opportunity to point out that, since the time of the original thread, there have been some significant advances in the area of "Master-Detail" (portal-plus-detail) layouts. See, for example, Todd Geist's Master-Detail and Master-Detail 2.0 techniques at Modular FileMaker, which build upon Bruce's Virtual List technique.

(Also reminds me that it's been a while since I last checked to see what's new at Modular FileMaker—I notice that Dan Smith's got a recent entry—so I guess I know what I'm going to be doing this morning.)

hth,

Mark

1 person likes this

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By Guy_Smith
      I can't figure out how to subtract the total of several child records from a starting value in a parent record:  Sounds simple, but it's got me stumped!
      My database is designed to issue Emissions Reduction Credits to companies for reducing or eliminating sources of air pollution.  Those companies then later use those credits to offset new construction, sell them to other companies for cold, hard cash, transfer them to other companies, etc.  The initial issuance is all on one Certificate and there can be between one and five pollutant credits on each individual Certificate.  A company can own many certificates, but a certificate can only belong to one company.  Once issued, a company can use the credits all at once or (more likely) a little at a time.  After each use/expenditure of credits, the certificate is reissued with the new balance of credits listed on it.  Thanks to a lot of great help in the Relationship subforum (Thanks again, Don and Bruce!), I've got the basic architecture down and issuing the initial credits works just like it should and the FIRST instance of credit usage calculates the new balance correctly, but when subsequent uses/expenditures are entered, the new balance ignores any previous expenditures.
      I've tried dozens of different calculations, added TOs, lumped all transactions into one TO, filtered portals, and barked at the moon, and nothing works (though I did manage to scare the bejeezes out of my cat!)
      I have attached my semi-sorta-solution to help clarify my problem.  It should open to the "Certificate" layout - the bottom portal has the usage data that isn't calculating the new balances correctly.  Any help in getting this up and running would be most appreciated - thanks in advance for sharing your time and talents.
       
      Best Regards,
      Guy
      FMPA 15, Windows and Mac
      ERC Registry v2 ModBFR Bad ERC Balance.fmp12
    • By Roger Tuan
      Is it possible to sync data in a Filemaker portal to an external MySQL database? For example, an invoice listing multiple products stored in another table (assuming I only want the information in the portal, such as qty, name, price).
      Or do we have to manually sync all related tables behind the scenes and then re-create the relationships using joins later?
      Thank you!
    • By Scott Pon
      Environment: FM13 with FM13 Server, mix of Windows 7 and 10.
      Is there a way to set a script trigger on if this portal row is new? IE, a script to run if this new child/portal record is new.  
      We have a parent record, and portal to Children records.  The children records have 2 fields: Profile Name and Process type.  Our user would like to enter a new child record (profile name and process type).  if the process type already exists, we will need to archive the existing record (matching the profile type).  There is more bI want to start with this first.
      I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals.  Any ideas on how to handle this?  Or am I going to have to add a button to go to another screen to accomplish this?
      Thanks.  I hope i gave enough info for you to help me.
       
    • By Sergej Ivanov
      Hi, I got stuck with building a proper relationship scheme.
      I'm making an database with several tables. One table contains information on archaeological features (key field Feature ID), another contains data on documentation. One document may contain information on several features, for this reason in documentation table I've created several fields (Feature ID 1, Feature ID 2, etc). The two tables are related through Feature ID=Feature ID 1; in the second table I've made a self-relation between all Feature ID fields.
      In the Features layout I've made a portal displaying related records from Documentation table. Unfortunately it only displays related to the first field (Feature ID 1), while other fields (Feature ID 2, etc) seem remain unrelated. 
      What do I do wrong? Thank you!
    • By atlanticind
      Im currently using a portal to relay certain information from my main database, the information that is related between the two are the fields of 'Brand' and 'Part Number'.
       
      The only other fields i have in my portal will be
       
      1. Sale Or Purchase (a drop down list to select either sale or purchase).
      2. Quantity
      3. Date
      4. Price
      Is there any kind of calculation so that when i select either the 'sale' or 'purchase' option in the drop down list that it will either add or subtract the quantity i then enter into my quantity field, this way my stock list can keep up to date with the correct quantities?
       
      Example
      Brand - ddd
      Part No. - 123
      Sale selected
      Quantity - 3
      Date - 22/02/2013
       
      so after i have entered all of this data because i have sold 3 i need my calculation to take 3 away from the overall stock, and for the calculation to add 3 if this was a purchase
       
      hope this makes sense
       
      thank you