8 Replies Latest reply on Jan 31, 2017 3:28 PM by IT_User

    Quick find on Lookup Field

    gdaquino

      Hello there,

       

      I have a layout that uses fields from a table. I've activated on this layout the quick find and I've created a quick find script to be used to look for data on some fields.

      Some of the fields that I'm using are lookup fields based on another table.

       

      The quick find works perfectly on all others fields of the layout except for some of them that are lookup.

       

      Is it correct? Is there any workaround or suggestion for this specific case?

       

      Thanks!

        • 1. Re: Quick find on Lookup Field
          philmodjunk

          Please describe your design in more detail.

           

          What do you mean by "activated the quick find"?

           

          Why do you need a script to do the quick find?

           

          What do you mean by "look up field"?  That term usually describes a field that copies data from a related record. But such fields can be searched in a quick find without problem so perhaps you meant something else?

           

          And there's a setting in the inspector that can include/exclude a field on the layout in/from quick find.

          • 2. Re: Quick find on Lookup Field
            gdaquino

            Ok I'll describe everything.

             

            I've created a layout where, following the request of the user, if the user starts writing with no fields selected, it will start saving the text in a field used for a quick find on all the requested fields. That's why I'm using the script.

             

            I've enabled the quick find on the layout and, in layout mode (yes in the inspector, data tab), I've set all requested field to be used in quick find.

             

            With most of them the quick find works.

             

            I have some fields that describe an address, let's take one for example, "address 1"  is a LOOKUP field that gets the address from a related ADDRESS table. When you populate address table, the address 1 on the other table will copy the data.

             

            I know that quick find can work on lookup field and in fact I set it on those fields but for some reason it is not working there.

             

            I hope I've described the situation clearly.

             

            Thanks,

             

            Gianluca.

            • 3. Re: Quick find on Lookup Field
              philmodjunk

              "address 1"  is a LOOKUP field that gets the address from a related ADDRESS table.

              Exactly how did you set that Up?

               

              1. This might be a calculation field in the layout's table that refers to the address 1 field in the address table.
              2. This might be the actual address 1 field from the address field added to your layout
              3. It might be a field with an auto-enter field option that uses either "looked up value" or "calculation" to copy the value from the address field.

              Normally, we only call option 3 a "look up field", but I am guessing that you have option 2 and that leads to my next question:

               

              What type of relationship links your layout's table to this address table? Might you have more than one address record linked to a given record in the layout's table?

               

              Also, exactly how does quick find fail on these fields?

              • 4. Re: Quick find on Lookup Field
                siplus

                I've created a layout where, following the request of the user, if the user starts writing with no fields selected, it will start saving the text in a field used for a quick find on all the requested fields. That's why I'm using the script.

                 

                If you want to be a successful developer, you'll have to grow a pair and stop following stupid user requests.

                 

                If users start writing with no selected fields, they have to somehow be gently reminded that they are dealing with a database, not with a yahoo-based tic-tac-toe.

                 

                Clients put together the "I need" and the "I want" in a bag, shake and place it in your arms. They are mainly clueless.

                Typical, but please help controlling it.

                 

                Evaluate implications. Like useless network traffic, index growth, multiuser, change of mind, whatever.

                 

                Be in control, educate, but stop being the yesman, you ruin the corporation.

                 

                You can implement a onLayoutKeystroke trigger, but will that be something else beyond "it can be done" ?

                Does it make sense ?

                • 5. Re: Quick find on Lookup Field
                  gdaquino

                  Well philmodjunk,

                   

                  I've set the address lookup on a specific relation. Basically there is an address table (users can have several), but one of them is the default (set by layout). The relationship gets the default address with the relationship based on the _id of the contact and the flag default on (only one can be 1 for the user).

                   

                  The trick with the lookup field is to make a 'relookup' action when the source change.

                   

                  The lookup can be set even accordingly to Filemaker, following their instruction that you can even found on FMTS15. Lookup are used from a very old version I believe.

                   

                  For the quickfind, lookup fields DO support quickfind, but somehow on this layout when the quickfind is run, those specific field are ignored.

                   

                  I'll do another test with a fresh new test solution with some lookup field and check if there it works. Then if it will, I'll do debugging on my original solution deleting a single Lookup field at a time to find what's wrong.

                   

                  I've even set a calculation with a text sum of those lookup field and set on this field the quick find and... it works. Not completely, because one of the field is ignored by QF, but it works 'more' .

                   

                  ------------------------------

                   

                  To answer to siplus, yes you are right. You have to drive final user to use in the best way Filemaker.

                   

                  But in this case the quickfind based on the OnKeyboard trigger on the layout MAKE SENSE. Because the layout is a list layout and the script simply transfer the keyboard input to the quickfind.

                   

                  Quickfind script is also suggested by Filemaker.

                   

                  Bytheway, siplus, excluding the 'project' idea that can be wrong or right, my question is purely technical on quickfind and lookup field. Do you have any answer or idea on it?

                   

                  Thanks!

                  • 6. Re: Quick find on Lookup Field
                    philmodjunk

                    Does that mean that with each keystroke you perform yet another quick find?

                     

                    Does what you just posted mean that you have a field in the layout's table that holds address information copied form the address table?

                     

                    And you still have described exactly how it fails to work. Telling us that "it didn't work" doesn't give us anything much to work with to provide a suggested fix.

                    • 7. Re: Quick find on Lookup Field
                      siplus

                      A field defined as a lookup is identical to any other normal or autoenter field.

                      Hopefully it's stored, isn't it ?

                       

                      It contains a stable, indexable value which will stay in forever, as long as the reference value behind the lookup does not change.

                       

                      1) If and when the reference value changes, the lookup field will receive a maybe new value, which will stay at the table potentially forever, unless 1)

                       

                      So I do not see any real difference between the way a value lands into a modifiable field and the field content per sè.

                      • 8. Re: Quick find on Lookup Field
                        IT_User

                        Could an example of what someone might enter for the quick find and the incorrect result be presented?

                         

                        and maybe of an example of when the quick find works?

                         

                        What exactly is a person typing, and what exactly is the result?