MasterDetail 2.0

by Todd Geist

This a major update to Master Detail 1.0.

New Features

MasterDetail Portal Record Limit

MasterDetail now detects the number of records in the MasterDetailRows table, and constrains the found set based on that number.  If there are 1000 records in that table then a max 1000 records will be found.  There is intelligent messaging displayed to the user about the state of the found set.

Gathers up to 5 Fields in the Found Set

MasterDetail 1.0 only captured the primary ID of the all the records in the found set. As a result, any other data you wanted to display had to be pulled from a related table.  MasterDetail 2.0 can gather up to 5 fields. That means that for most cases you will not have to pull related data into the portal.  You can capture other fields along with the ID, and have the virtual list parse them out into fields.

Virtual Trigger “Before Capture Found Set”

MasterDetail now has a Virtual Trigger that runs just before the found set.  This give you the chance to do things like sort, or further modify the found set before it is captured.  You can learn more about Virtual Triggers in this video.

Use Case

MasterDetail was designed with one main use case in mind.  I wanted the current found set of records to be displayed in the portal in the order that they appeared in the found set. I wanted to have it behave as much as possible like regular old FileMaker,  just display the found set in  portal.  I think it does that pretty well.

However there are some limitations. Its not going to perform well on large found sets when the file is hosted on a remote server.  Anything more than a few thousand records is going to bog down.  Thats why I added the feature to automatically constrain the found set.

Some people may want to use Perform Script On Server (PSOS) to get around this issue. But it won’t work.  The found set is local to the client, not the server. When you call a script with PSOS, it won’t know anything about the local clients found set.

You could certainly extend Master Detail to use other record gathering techniques like SQL, or PSOS, but they would require more work and not be as generally applicable as it is out of the box.

Video

There is a video on all the new features and implementation at geistinteractive.com. Go check it out !

Version History

2.0.2 released 12.22.24

Download

MasterDetail2_0_2.fmp12

 

99 responses to “MasterDetail 2.0”

  1. […] for up to 5 fields in the found set, virtual triggers, and automatic found set limiting.  This ModularFileMaker Module is now better than […]

  2. john renfrew says:

    Todd
    for some reason your validation script is failing at the first test
    LayoutObjectNames ( Get ( filename ) ; Get ( layoutname ) ) DOESNT seem to work, but LayoutObjectNames ( “” ; Get ( layoutname ) ) does get the objects just fine….

    john

  3. john renfrew says:

    … and in the other $fieldFound calcs…

  4. Terry says:

    The script, “Trigger: On Record Load”, contains Go To Object script steps for two objects – NoFoundSet and RecordsFound. These objects don’t appear to be on the customers layout.

    Thanks for the site. As a Filemaker newbie, I’m learning a great deal by studying the modules.

    • Todd Geist says:

      yup, its ok that they aren’t there. If you wanted to you could use them to hide show different parts of the screen to respond to the found set.

      in truth those are bit obsolete. the better way to accomplish the same thing is to use the Virtual Script trigger that is provided.

      Todd

  5. Todd,
    in the Script “Reset MasterDetail Rows Table” you are setting the variable $sequenceIsOff with this string:
    /*ROWS::n Get (RecordNumber)*/

    So “sequenceIsOff” will never happen…

    Robert

  6. john renfrew says:

    line 17 of the Virtualize Found Set script is a … is it important?

  7. Tom Robinson says:

    flustered !
    have watched video and meticulously followed install steps
    “Reset MasterDetail Rows Table” …. does not load records into master detail rows
    Test Layout For Common Errors” reveals no fault

  8. Mike Ryan says:

    $$MasterDetail_Data does not delimit fields properly if a MasterDetailField is empty. For example, try deleting the defaultPhone number for a record and watch what happens in the portal row.

    • Todd Geist says:

      I think this is fixed. Atleast I thought I fixed it last month. Can you down load another copy and try it?

      Thanks

      Todd

      • Mike Ryan says:

        Tried the file at the above link. Same problem.

        • Charles says:

          I noticed the same problem . . . believe it’s because of how the scripts use the pipe characters to parse data into separate fields with the expectation of data between the pipes. Solution that I found in the meantime was to update a script step in the “Update Current Record State” script . . . changed part of the original Set Variable [$values] script step to:

          state =

          v1 &
          If( v2 “” ; “|” & v2; “| ” ) &
          If( v3 “” ; “|” & v3; “| ” ) &
          If( v4 “” ; “|” & v4; “| ” ) &
          If( v5 “” ; “|” & v5; “| “)

          So that if “v” is blank it adds a trailing space behind the pipe character, which results in an empty display field in the portal rather than shifting the other values up.

          That seems to have done the trick for me, at least on my initial quick testing, but there may be a better suggestion.

          • Charles says:

            Note: initial post stripped out the “not equals” symbol, the correct content that I’m using should read:

            state =

            v1 &
            If( v2 ≠ “” ; “|” & v2; “| ” ) &
            If( v3 ≠ “” ; “|” & v3; “| ” ) &
            If( v4 ≠ “” ; “|” & v4; “| ” ) &
            If( v5 ≠ “” ; “|” & v5; “| “)

          • Todd Geist says:

            Well darn. I am certain I fixed this issue, but this file clearly doesn’t have the fix. Not sure what happened. I’ll have to redo it. grrr

    • Todd Geist says:

      Mike and Charles.

      Check the latest version 2.0.2. Just uploaded today. 12.22.14. Let me know if you still have the issue.

      Thanks

      Todd

      • Charles says:

        That appears to working for me – thanks for the quick fix and the awesome Module. This is really helping with navigating records in multiple contexts. Much appreciated for sharing your hard work.

        • Todd Geist says:

          Great !!!! Thanks 🙂

          • Brian says:

            Todd,

            I am running 2.0.2 and I am still running into this error. Trailing carriage returns and fields with (occasional) empty values create havoc in the master detail portal. I did attempt to resolve it by deleting the module completely and repasting it into my system.

            Thanks
            Brian

          • Todd Geist says:

            Hello,

            The easiest way to handle this is to make sure your data doesn’t have returns in it. Create a calc field that handles returns and empty values and map that to the field object on the layout.

            Todd

  9. Guy Smith says:

    Todd: This is an AWESOME module – You’ve doubled the life expectancy of my mouse by eliminating all of those extra clicks I used to make!
    A (hopefully) quick question: Is there any way to change the formatting of the 4 new fields? Most of my layouts have currency data in one of the new fields, but it is displaying as a generic number (sometimes it even changes a value from, say $64.39 to $64.3899999998). When I use the Inspector to set the field to currency, it is grayed out and has no options available.

    Thanks again,

    Guy

    • Todd Geist says:

      Hi Guy,

      This is because the calc field that are displaying the data are generic text. But you can make a copy of one and set it’s result to “number” and then everything should work as you want. I think there is an example of that in there using a date field.

      hth

      Todd

  10. Guy Smith says:

    AAAAARGH – my third remaining brain cell malfunctioned! The dollar sign in front of the $64.389999998 does NOT belong there – that’s sorta the main point of my question – I can’t get the field to format as currency! Sorry!!

    Guy

    • Todd Geist says:

      Hi Guy,

      See my previous response. You can create a different display calc in the DetailRows table. Look in there you should see an example of something similar but with a date field. Remember they are just calculated fields, so you can make the look like anything you want. If you want it as number set the result of the calc to “number”. Then the currency formatter will work.

      Todd

  11. Lazlo says:

    Can you please explain what is influencing the behavior of the scroll bar in your demo file? Whenever I do a new search the position of the “elevator box” seems to jump to the center.

    • Todd Geist says:

      Hi Lazlo,

      I am not sure what you mean by “Elevator” Box. But the scrolling is done by a script. The intent is to keep the selected record visible. If you don’t scroll the portal so the selected record is visible it kind of feels wrong.

      That turns out to be tricky. I tried to cover the broadest use cases, but perhaps you have an edge case.

      Can you do a screen cast to show whats happening?

      Todd

  12. I’m a n00b as to FMP13, so this might be a silly couple of questions.

    I’d like to set a hover state (like a gradient), but when I do that, the text can’t be read. I can’t find any way to arrange items on the layout to overcome this, and I assume it’s because the text is in the portal, and the objects that could react to a hover state are layered over them. Anything I can do for this?

    Second, I’m assuming that this will be possible: I’m using the portal to display the virtual list alongside Matt Petrowsky’s Virtual List Portal Sidebar which I’m using for a menu. I’m doing it to make a kind of a rolodex (but searchable with your search field). So I don’t have a detail view on my layout – I just stretched the portal across the remaining real estate.

    Am I right that I’ll be able to modify the scripts to make it go to the detail layout (a separate layout) when I click instead of how it works in your sample? Or should I be looking at a different idea?

    Lastly, it’s not sorting for me. Don’t know why. I tried following your instructions to the letter initially, before making my mods. Still didn’t sort.

    • Todd Geist says:

      Sorry for the late reply,

      yes it should work with Matt’s.

      Second question: It should work.

      Sorting: question. Sorry not sure why it;s not working for you. Maybe try the latest version?

      Todd

  13. Dale Long says:

    What would be required to expand the number of fields hyperlist can use? I looked at the code and it didn’t seem like it would be TOO hard, but I’m afraid I might miss something or break things irreparably if I go mucking around too much!

    • Todd Geist says:

      Not to much work, but I am afraid I don’t have the time to go and do it. But I’ll bet you can figure it out. 🙂

      Todd

      • Dale Long says:

        Thanks for taking the time to reply. I was hoping for an easy way out on this one, but I forget that I’m not the only one that is busy!

        I went ahead and made my own attempt at this, and for the record, this modification seems quite impossible to do with the current design of Hyperlist. In the script Get Values in Found Set ( FieldName ) there is a massive calculation for a variable called $__Data[$n].

        There is a repeating pattern of something like

        GetNthRecord ( field ; rep + 0 ) & colSeperator & GetNthRecord ( field2 ; rep + 0 ) & colSeperator2 & GetNthRecord ( field3 ; rep + 0 ) & colSeperator3 & GetNthRecord ( field4 ; rep + 0 ) & colSeperator4 & GetNthRecord ( field5 ; rep + 0 ) & delimiter &

        then repeat, while incrementing the ‘0’ in the above pattern, up to 100 or so. Part of my attempt to implement an increase in fields involved a tedious process of modifying this calculation to something like:

        GetNthRecord ( field ; rep + 0 ) & colSeperator & GetNthRecord ( field2 ; rep + 0 ) & colSeperator2 & GetNthRecord ( field3 ; rep + 0 ) & colSeperator3 & GetNthRecord ( field4 ; rep + 0 ) & colSeperator4 & GetNthRecord ( field5 ; rep + 0 ) & GetNthRecord ( field6 ; rep + 0 ) & colSeperator5 & GetNthRecord ( field7 ; rep + 0 ) & colSeperator6 & delimiter &

        However, I found that I ran out of characters in the 30000 limit for a calculation!

        So, I would have to advise others to just simply go with the hanging TO approach for adding more fields to MasterDetail rather than trying to modify HyperList to accommodate more fields. It doesn’t seem possible with the current implementation!

        • Todd Geist says:

          I know some people have expanded it to seven fields. But you are right you will quickly run into the calc limit. Hanging a TO of the end is a good work-a-round

          Todd

  14. Cristos L-C says:

    Thanks for the great module, Todd! I’m getting some missing rows in my portal for records that have a “/” in one of the fields. However, they show up just fine when I select them (or a row below them).

    Is there something in the parser that would choke on slashes? Any suggested workarounds?

    Screenshot of missing: http://note.io/1x5Gtlu
    Screenshot with row showing: http://note.io/1x5GLsD
    Screenshot of $$MasterDetail_Data: http://note.io/1GvC9vJ

  15. Thom says:

    Thank you so much for your work! I’m new to Filemaker, and with your tutorial i got everything to work!
    After using MasterDetail for a short while, a request came up: How could we navigate through the List (left) with cursor keys? Is there an easy way to implement that…or is that too difficult?
    Honestly as a “beginner” I have absolutely no idea how to do that…:-(
    Hopefully other users also would see that as an improvement on user experience 😉

    Thanks!

    Thom

  16. Vincent says:

    Hi,
    Unless the top right search box isn’t meant to search, its seems it doesn’t work.

    Just from the donwloaded file, first run.
    I type Shinbone in the search box and click the blue All button. After a LONG while, it goes to Biplane Messiest

    Is that because my OS is in french, but my Filemaker install is in english though.
    FMPa 13v5, Yosemite

    • Vincent says:

      Sorry, I just understood that I should have type a carriage return for the search to trigger !
      Maybe a carriage return symbol would help near in the Search label.

      DOCUMENTATION : Read me could be improved by saying :

      – Import Table MasterDetailRows AND its records (at first I only imported the field definition)
      – Please copy the fields zg_foundCount and zg_searchField of customers table (instead of just saying copy the 2 files : which ones)
      – Also, warn about the fact that the search only search among the fields that are on the layout (and in all of them). I thought the search would only occur on the field 2/3/4/5. Maybe the diagnose script could check or warn about this.
      – In the hidden layout part, maybe tell the user to put the field zg_searchField in the search box

      IMPROVEMENT :

      In the portal, hide fields that contains a ? or table missing

      Some confusing stuff in “Virtualize Found Set” Script (ok we’re not supposed to look I guess)

      – Step, n°27 is disabled. From a user stand point it’s confusing
      – Step, n°30 doesn’t seem to work has $foundCountFieldName variables never gets initialized of given a value

      Anyways, thanks for this excellent stuff

      • Todd Geist says:

        Hi Vincent,

        The Search field has the same behavior as the QuickFind feature built into FileMaker’s status bar. Thats why you have to hit return.

        All the rest of your ideas are pretty good ones. Why don’t you make those changes and send the file back to me.

        Thanks

        Todd

  17. Great stuff Todd!

    I added an extra line in my implementation in the script “Find All Records”:
    Set Field By Name [GetLayoutObjectAttribute ( “MasterDetailQuickFind”; “Source” ); “”]

    It seems logical to me that the filter value is cleared when there is no filter active. Apparantly FileMaker disagrees because of the behaviour I see with the toolbar QuickFind field. Well… anyway…;-)

  18. Tim Anderson says:

    I have made some modifications to 3 scripts that enables me to use this great module in more than one context. Basically allows a MasterDetailRows_Contacts, MasterDetailRows_Organisartions, MasterDetailRows_Projects etc as you need.
    It is not fully tested but seems to be working so far!

    Script: Virtualize Found Set
    If [ IsEmpty( $$_md_numberOfRows ) ] becomes
    If [ IsEmpty( Evaluate( “$$_md_numberOfRows_” & Get ( LayoutTableName ) ) ) ]

    Set Variable $$_md_numberOfRowsSet calc changes from
    $numberOfMasterDetailRows
    to
    Let ( x=Evaluate( “Let( $$_md_numberOfRows_” & Get ( LayoutTableName ) & ” =$numberOfMasterDetailRows;1)”)
    ;
    1
    )

    Calc for Set Variable $numberOfMasterDetailRows
    becomes
    Evaluate( “$$_md_numberOfRows_” & Get ( LayoutTableName ) )

    Calc for Set Variable $$MasterDetail_DataSet
    becomes
    Let ( x=Evaluate( “Let( $$MasterDetail_Data_” & Get ( LayoutTableName ) & ” =\”\”;1)”)
    ;
    1
    )

    Script: Store Data ( data )
    First line variable calc changes to
    Let ( x=Evaluate( “Let( $$MasterDetail_Data_” & Get ( LayoutTableName ) & ” =Get (ScriptParameter);1)”)
    ;
    1
    )

    Script: Update Current Record State
    In calc for $values add the next line to the Let area
    _masterDetail_Data=Evaluate(“$$masterDetail_Data_” & Get ( LayoutTableName ) );

    and the calculation of the result becomes

    LeftValues( _masterDetail_Data ; n-1) &
    state &”¶” &
    MiddleValues( _masterDetail_Data ; n+1 ; 1000000000000)

    Add a duplicate of the MasterDetailRows table – for example MasterDetailRows_Contacts and change the the RowData calc to recognise whatever the context (layout table name)
    eg
    Substitute(
    GetValue($$MasterDetail_Data_Contacts ; n) ; “|” ; “¶”
    )

    Would upload pdfs of the scripts if there was a way!

    Hope this adds another dimension for some

    Tim

  19. Jesse Swensen says:

    Tim, I’m interested in this same functionality. I want to use the module for multiple “subjects”, contacts, products, etc… Have you implemented this in your solutions? Have you any feedback from @TODD? I’m just ready to dive into it and would like to know…


    Jesse

    • Todd Geist says:

      Hi Jesse and Tim

      There is another approach to this. Check out the video and sample file on Selector Connector

      https://www.geistinteractive.com/2014/11/21/filemaker-selector-connector-video/

      In that video, and in the sample file. I show hoe you can use this technique with Selector Connector to make it easy to use with many different “subjects”

      Hope that helps

      Todd

      • Tim Anderson says:

        Hi Jesse and Todd

        Jesse, client is testing now but seems to be working fine.
        As it happens after implementing that I ‘upgraded’ to Selector Connector but didn’t make changes to the MasterDetail module(s).

        Tim

        • Jesse Swensen says:

          Hi Tim, I went through what Todd has presented for the Connector/Selector method and I find it very interesting. Thank you for the pointer.

      • Jesse Swensen says:

        Todd, this is a very interesting approach. I’ve used Anchor/Bouy for several years, but this idea seems to feed it steroids. I can see how it would make things better. I don’t see it in your list of Modules yet. I suspect that is because you are still working through it. Is there a mailing list or some such that would let me know when you’ve got a working module?

        • Todd Geist says:

          Thanks 🙂

          There is more information out there about this technique. Lots of people are talking about it. It just might be catching on. Google “Selector Connector”

          Todd

          • North2Alaska says:

            Thanks Todd. I’ve looked and find information. What I was hoping for was more details (Meaning code I could steal. 🙂 ) Thanks for what you have produced. It will go a long way…

            Jesse

          • Todd Geist says:

            I think all the code you need to steal is out there. Its not much. Again the best thing about this is technique is how simple it is. Its mostly a matter changing your perspective. Connect everything with CONNECTOR, and select everything with SELECTOR.

            Todd

        • Todd Geist says:

          Not sure when or if I will get around to releasing a module. The SelectorConnector demo file has a module in it that contains some useful Selector Connector code. But SELECTOR CONNECTOR is not a module. Its a bigger pattern for organizing your graph. Once you adopt it you might start to write modules that work best in a SELECTOR CONNECTOR paradigm. Thats what I do now for the most part.

          Hope that helps

          Todd

  20. Marty Enerson says:

    I am running into an issue where when I open the layout with the Master List on, it shows all the records and then they disappear from the list. The found records go to zero. When I click show all records, the first record shows up in the list. Then I need to click to the next record to have the records populate. Once I click through all the records, they show up in the list and everything works find. If I go out of the layout and back in… they disappear again. I am using FM 14, but I don’t think that is a problem since your sample works fine.

    Any thoughts?

    • Marty Enerson says:

      more info too, just in case it has something to do with it. 3 of the 4 additional fields are calculation fields… but they do show up when I click through records.

      I can send a video of what I am seeing if needed.

      marty

      • Todd Geist says:

        Sorry, don’t really have time to dig into it right now. But if you think it might be calculation fields that are causing the problem, and easy way to check would be to make the regular fields, and see if that fixes it. I doubt it will, but it is an easy test.

        Todd

    • Todd Geist says:

      Hi Marty,

      Can’t really tell whats going on from your description. But it sounds like something broke when you copied the code into your file. You might try repasting the layout content in

      Todd

      Todd

  21. Marty Enerson says:

    I am going to sound like an idiot, but I was working on a local copy and it wasn’t working. I decided to put it up on my FM server and when I connected to it, everything worked. It must have been something that I needed to close and then open the file… because I then opened my local copy and it worked too.

    Anyway, great module. I am using it horizontally too. Looks and works awesome.

    Marty

  22. Mike Ryan says:

    Trying to understand why most of the Record Menu items are disabled until the user clicks on the layout.

    In the script “Trigger: On Record Load”, line 10 is: Go to Object [ Object Name: “RecordsFound” ]

    There is no such object on the layout. Wondering if there is an intended purpose for this script step, or is it just there for the developer’s information? I replaced it with Go to Field [] and my Record Menu items behave as desired. Am I missing and/or breaking something?

    (PS: MasterDetail ROCKS!)

  23. Todd Geist says:

    Hi Matt,

    You can just delete that step. The reason was so that you switch to a different panel if there were no records found.

    I am surprised that this caused the menu items to be grayed out.

    Todd

  24. Chase says:

    Todd,

    Whats the best way to automatically filter the found set in the MD portal based on a boolean active/inactive toggle on each record? I want to be able to hide records from my users based on whether that record is active.

    Thanks for your help, MD2.0 is awesome!!

    • Todd Geist says:

      You can use the Virtual Trigger Filter that I talk about in the movie. Create a script with a constrain found set to show only active records, and attach it to the virtual trigger button. 🙂

      • Chase says:

        awesome! thanks! ill give that a try!

      • Chase says:

        Ive been working on getting this to happen. I made a simple one step script the constrain the found set by Record::Active = 1 and attacked it to the virtual trigger, but when i attempt to run the find all records script, it appears to get stuck in a loop? FileMaker effectively freezes, and unless i have the debugger open, i can’t perform any other actions. Do i need more steps in the script? do i need to explicitly tell it to exit the script?

        Thanks again for your help! <—relatively new to FM (Using FM 13)

  25. Tom Lewis says:

    Todd – This is an great module. Clean and easy to understand. I have tried implementing something similar, but your method is MUCH cleaner. There is one problem that I have always encountered with FM and portals. When I add a new record and the record appears below the last visible record on the portal, I want the portal to scroll down and make that record visible. I have never been able to resolve this issue. Any thoughts on how to “fix” this?

  26. Brian says:

    It’s worth noting that if you use an additional field that is occasionally empty, the master detail portal data will get off slightly. The specific behavior I am seeing will place the date of birth in the place of a child’s name, if the gender is not selected. Also, once this error is triggered, if you click on a portal row, the data that is displayed is from the row directly below the row that was selected. Each subsequent click will produce the same result of data directly below the row that was selected. The only solution I have found is to ensure that all record data that is included in the virtualized data set has a valid entry.

  27. Jesse Swensen says:

    I’ve been building a system based around this module. It works really well, except (you knew it was coming) for two two things.

    1) If I put a related field in one of the 5 fields, the value does not display, but shows “?” instead. When you click on the row in the portal, the values get filled in correctly. The problem seems to stem from the “Get Values in Found Set ( FieldName )” script of the HyperList module, but I don’t understand why it’s not working.

    2) When I add a new record, the portal gets messed up. The new record is created but the portal does not update correctly and when the record is saved, the portal is sorted again but does not get updated. So, you click on a row and the values change.

    Any ideas?

  28. Robert Carrier says:

    Love the things you do, but I had your module working perfect on a local machine, but as soon as I loaded it on my Filemaker Server, the list items disappeared. Both in the filemaker advanced application mode and web-direct. The local version still works fine.
    Anyone else having this sort of problems with filemaker server and this module?

    • Todd Geist says:

      Hi Robert,

      I can’t think of anything off the top of my head that would change on the server. It definitely works on the server. Possibly something we Perform Script on Server

      Todd?

  29. Marc Hill says:

    Hi Todd.

    I tried to download the Master Detail 2.0.2 zip, but I’m getting an “Unable to expand … No such file or directory” error. I tried to run it through terminal to fix it, but no luck. Any chance you could repost the example file?

    Thanks for all that you share. It’s great!

    Marc

  30. Evan Z says:

    In reference to expanding the hyper list number of fields. I could use just 1 more to fully solve an hurdle I am working on. Anyway to point me in the right direction? I saw a quick discussion in earlier comments but could not completely follow.

  31. Evan Z says:

    How does one sort the list by alphabetical order of, say, Field 2? I tried to sort the portal and it alphabetized but then the click on the Contact function stopped working properly.

  32. Evan Z says:

    Todd — I think I’m missing something, I only see 4 fields. Can the Primary_ID of the table be shown as a field? Also, I have the Primary ID set as the Table Serial ID (auto-entered number for each new entry). Can I make it, say the Name field or should it remain the Serial ID? Thanks btw, this module is amazing!

  33. Todd Geist says:

    Evan.

    You don’t sort the portal, you sort the found set. The portal mirrors the found set. that’s the interesting thing.

    You can show whatever you want in the portal. The ID field is on there. Show it if you want.

    A primary key should always be menaningless. It should never be a name or anything like that

    Hope that helps

    Todd

  34. Evan Z says:

    Todd,

    Thank you for the explanation. Pardon my naïveté, how do I sort the found set? I noticed there are a couple files, one in the MasterDetail module script folder and one in the HyperList module script folder. I just want to make sure I do not mess the whole thing up. 🙂

    Evan

  35. Todd Geist says:

    You just do a Sort with the Sort Script step. Then always call Virtualize Found Set after you change the found set in any way

    Thats it

    Todd

  36. Evan Z says:

    Hehehe, I guess, my problem is … where is the “Sort Script step” exactly? Is it in the MasterDetail or in the HyperList API?

    Evan

  37. Todd Geist says:

    The script doesn’t exist. You create the Sort Script. Sort it however you like. Then call the Virtualize Found set script at the end of that script.

    Todd

  38. Evan Z says:

    Is there any way to embed this into a layout of a different table? I’m trying to create a Dashboard for users and my MasterDetail displays all information for all Clients we work with. I want each user to have access to it, but ideally, without having to go to a separate layout. Any suggestions? Thanks!

  39. Todd Geist says:

    Not sure wat your asking.

    Master Detail was designed to show the current found set in a portal. That’s it’s job. It won’t work show all your clients from a layout based on a Dashboard record. So you’ll need to find another way.

    Todd

  40. Evan Z says:

    If I want to have 2 Master Details to show records using the Virtual List for two separate tables, do I just duplicate all of the Module scripts and then make changes on those duplicates for the 2nd table?

  41. Todd Geist says:

    Sorry can’t be much help there. Never tried it.

    🙁

    Todd

  42. Evan Z says:

    Anyone figure out the workaround for the putting a related field in one of the 5 fields, that Jesse Swensen mentioned? I am running into the same issue with the “?”.

    I could create a relationship and just push all those specific related field data to a copy of the fields in the main table. Is that advised or is there a better way?

  43. Evan Z says:

    Also, has anyone figured out a simple workaround to allow the Search capability to search any words in the presented fields rather than having it have to match the first word onward of each field in a search? (Ie. Company name is “John Adams Casting” and a search for “John Adams” or “John” brings up the record, but a search for “Adams” gets a null result.)

  44. Joe Ricciardi says:

    Great work Todd. Thanks very much for your community contributions. I am just transitioning over to Filemaker from other platforms including MS Access and, even though we could do some of these things more ‘simply’ in those environments, Filemaker offers more overall benefits and unique features for small developers and in-house projects that outweigh the trade-offs.

    I’m not sure how much your modular Filemaker concepts as a standard have caught on, or even will catch on…in a sense that’s irrelevant…but for myself coming from some other areas of application programming, just observing your ‘style sheet’ on Modules has helped me understand things more quickly and organize more efficiently. I know that everyone learns differently and that one of the joys or benefits of Filemaker is the ability to just allow your application to ‘evolve’ over time but for me I can’t afford the long trek back that can occur from that type of dead end in all but the smallest projects. So again thank you for the expression of your personal roadmap to success. It definitely helps.

  45. Todd Geist says:

    Glad you like it 🙂

  46. Tom R. says:

    Hi Todd,

    Thank you for putting this module together! A question – how would you recommend displaying data from related tables in Master Detail? For instance, I have a projects table set up with Master Detail 2; the Projects table has a foreign key for the related client record (Parties table), and on the layout I just display the Parties::name field from the child record. I thought of adding a name field to the Projects table that is just a look-up of the Parties::name field, but wondered if you have a better suggestion?

    Thanks!

  47. Evan Z says:

    Looking to add a Custom Dialogue message if the User enters an item in the Search field and it brings back no results. Currently, nothing happens and the User just has to figure it out. Where specifically in the Search Field QuickFind trigger script should I place the line? Do I need an If statement as well laying out if no results are returned? I’ve been learning a lot recently, and this module is beyond amazing (thank you, Todd!), just this part is getting a little over my head at present.

  48. Evan Z says:

    Re: Custom Dialogue message when NO RESULTS FOUND …

    It looks like it all relates to zg_foundCount. When zg_foundCount is empty, a message should be triggered. HOWEVER, when no results match zg_founCount shows ALL records (number) instead of 0 or empty. Anyone understand that or what exactly is happening? If I could understand that, maybe I could modify the script to show the error message based on what is actually resulting?

  49. Evan Z says:

    Wait, MasterDetail2.0 is completely non-functional in WebDirect?!?!

  50. Todd Geist says:

    Even,

    Master Detail was written before WebDirect was a thing.

    Todd

  51. Evan Z says:

    Todd — I think it can be modified to work.

    I have the left side bar functioning — you need to bring the button that selects the selection to the front.

    I am working on the Search field now. WebDirect does not allow OnObjectKeystroke triggers (http://help.filemaker.com/app/answers/detail/a_id/11998/~/feature-comparison-for-filemaker-pro-and-filemaker-webdirect), so I am trying to figure out the proper way to script the Search into a button just to the side of the input field. Let me know if there is an easy script wording for it.

  52. Evan Z says:

    Search functionality in WebDirect: Just remove lines 1 and 22 from the OnObjectKeystroke script and place it on a new button that you click to run the search. Then functions on WebDirect when combined with the above tweak.

  53. Evan Z says:

    The only remaining glitch on Webdirect is that the left side scroll portal let’s you scroll but then jumps back to the section of the portal where your selected “contact/item/etc.” is located. It is not a feature of the portal itself so is a bit odd.

  54. Evan Z says:

    Todd — Any thought on how to overcome the scroll bar glitch when integrated into Web Direct?

Leave a Reply

Your email address will not be published. Required fields are marked *