2 Replies Latest reply on Jun 18, 2015 5:35 PM by starstuff

    How to Auto-Enter Popup Picker when Found Count is 1

    starstuff

      Title

      How to Auto-Enter Popup Picker when Found Count is 1

      Post

      Hi All!

      im want to add auto-enter in Popup Picker, if Found Count is 1 on the list.

      the popup-picker is this
      http://filemakerhacks.com/2011/05/09/popup-pickers/

       

      here is the Demo File http://kevinfrank.com/fmh/popup-pickers.zip
      it auto filters the search result as you type "search terms",

      example i have a product list of
      Apple
      Banana I
      Banana II

      Case I
      if i search, type "App" in Popup Picker it will list only Apple, i will have 1 listed
      item on the list and i would like an auto-enter to trigger, adding this in the LINE items

      Case II
      if i type "Bana", 2 items will be listed Banana I and Banana II, no
      auto-enter here because there is 2 item
       then i add Bana with " II " in the search field, i will get Banana II ( 1 listed
      item on the list)
      and auto-enter will trigger and add this in the LINE items
       

      is this possible to do?

       

      Thank You!

        • 1. Re: How to Auto-Enter Popup Picker when Found Count is 1
          philmodjunk

          what you describe is not a found set. I don't have time to click links and download your file, but I think that if you enter search text and only one record is listed in the portal, you want it to be automatically selected for you. This could result in selecting unwanted data after mistyping search text, but to answer the question, Thus, you might want to pop up a dialog asking for confirmation here or some such double check.

          if this is a filtered portal, this would be tricky to do as it would not be simple to determine that only one record passes the filter. If method uses an older method where a fairly complex calculation field is used as a match field and the portal is not filtered, a calculation using count could determine that there is only one record showing in the portal and then a script performed via script trigger on the search field could auto select the single value.