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 docasar
      Hello,
      I am newbie to filemaker pro but love it   Said so, I am struggling a solution that I am building for management of holiday apartments, based on FMSP. I have created a table for bookings, and apartments, and now I am working with another table call Daytariffs that would give the price for each day of the year for each apartment. So far I have being able to show the available apartments for a range of dates, but what I am struggling now is to show the prices for those days. Basically, what I have done on the DayTariffs table is to load 365 days (records) then I have created a field called "Range" and put a calculations that shows "YES" if a date is within the dates I have set on the Booking layout as StartDate and EndDate (this dates are global fields). I have created relationship between Daytariffs and Bookings through ID_DayTariffs (Daytariffs table) = id_daytariffs (Bookings table). Later,  I have also created a global field called "BookingDAYS" on Bookings tables and set the field value as "YES", and I have created a new relationship that relates BookingDAYS = Range.
      Then I have created a portal based on the the relationship between BookingDAYS=Range, on the Bookings Layout but wont show any records  I am stuck here because if I change the Range field to be just text without any calculation and I write "YES" then the portal works, but as soon as I put the calculation back, the related records disappear...
      I have checked that calculated result on Range field is set as Text as well as BookinDAYS is a text field... also what have noticed is that the relationship graph for BookingDAYS=Range has this simbol at both sides "|---" when normally would have a three lines (like a folk) when I choose any other filed for that realtionship instead of Range.
      I am attaching screenshots of relationship graph, booking layout and DayTariffs Table
      Any ideas what I am missing here?
      Thanks a lot.
      Luis



    • By Becca
      I'm very new to FileMaker design, so I may be missing something very basic, but I cannot figure out how to make this work.  I've got a working portal set up, showing the correct records.  I can add new records using the blank line in the portal, and those records then show in the portal window.  However, if I go look at the actual table that the portal links to, the new records are not being added there.  Are they going somewhere else instead? I need to actually create new records, not just display them!

    • By fyanesv
      Hi, I’m really Stuck , any suggestions would be most appreciated.
       
      Problem :
      I need to replicate a particular behavior of the PopOver that is inside a Portal.
       
      Behavior:
      When inserting or editing portal Rows via popOvers, the data updates in the portal before “committing”. 
       
      Solution:
      Trying to replicate this behavior according to this rules: 
      -. Using Transactions and Data modeling.
      .- Data not updated at the portal before committing (refreshing portal by trigger or exiting a field doesn't work).
      .- Data not updated at the portal as inserts or edits are been made (same as above). 
      .- Inserts or Edits are made outside the portal in the same layout (no modals, Using SlideControl).
      .- Not using PopOvers inside portal.
      .- Portal is not accesible by user it only shows the list of items been inserted or updated.
       
      I have tried different approaches but no solution yet, trying to replicate behavior has been very frustrating.
       
      Tried:
      Filtered Single Line portals and Magic Key with different Techniques and different relationship approaches, I have not tried Globals via Scripts which I presume could be a solution but don’t have much to start with!!!.
       
      For the record:
      A few months ago I started implementing “Selector Conector and Transactions”,  I´m not so sure I have correctly implemented this.
       
      I have prepared a Sample file (is not the actual solution) with very simple use of Transactions and Data Modeling, it shows different approaches I have tried. Used some technics learned here at this forum which have been very helpful.
       
      Approaches number 1 and number 2 from the Sample file are not the preferred, but merely show the behavior I´m trying to replicate.
      A script at start creates small window that shows records are been created in child's table even tough it won’t update the portal before commiting when using technics 3 and 4 from the Sample file.
       
      Hope my explanation makes any sense. 
       
      Thanks in advance, and cheers to all 
       
      PS.: Check the green Framed Portal at the right hand side of the layout´s Sample file for a cool technique that I designed, it uses  “Hide Object when”, and a combination of formatting the Button and portal row (Padding), which makes the illusion of an X circle appearing on the right side when Hovering portal rows, mostly used for deleting. Hope any one has a use for it.
      Sample.zip
    • By laurend
      I created a database to track permits by building. Each permit type is stored in its own table. The only link between tables is the Building Name which is the physical location where the permit exists.
      Tables:
      v_Buildings (fields include building name, ID, building status, address, city, state, zipcode)
      Air (ID, Building Name, Expiration Date, Days_to_Expiration, Type, etc...)
      Water
      Food
      Elevator
      ...9 permit types in all, and I will add more in the future
      Each of these tables has the same fields in common:
      BuildingName
      PermitExpirationDate
      PermitOwner
      Days_to_Expiration
      I created a Dashboard layout with the idea that users could select a building name from a drop-down menu and then see all of the permits for that particular building along with their expiration date and the permit owner's name. I am just baffled as to how to do this across multiple tables. I have looked at SQL, Join tables, portals etc...., and I cannot figure out how to aggregate all of this information into one view for users.  I cannot even seem to figure out what table should be used for the Dashboard layout. I would love to hear from the community the best and hopefully scalable approach for designing this layout.  Thanks in advance from a novice user.
       
    • By mbarrett65
      I'm using a field-based value list in conjunction with a filtered portal based on a relationship. The filtered portal seems to be working fine. However, "1" and "0" are showing in the value list though neither of those values are in any records.
      Issue #2 is that unless I include "IsEmpty (fieldname)" in the calculation field used in the relationship, all my portal fields have to contain data or the record doesn't show in the portal. In other filtered portals, I've never added "IsEmpty" to the calculation field and records have shown in the the portal regardless of empty values (see yellow highlight in screenshot).
      Thanks for any insights on these two issues.