2 Replies Latest reply on Jan 13, 2012 9:21 PM by RayCologon

    Create layout for FIND, enter in data, massage data and lookup INDEX of a different table.

    user12884

      Situation:

      1. Large number of complex records

      2. A very long coded string takes much too long in a unique record search.

       

      Goal:

      1. Create a Layout to have the user enter in a Coded TEXT String and press a scripted button for find the record they are seaching for.

      2. The Coded String is long and contains the Record Index (Key/number) of another table within the string.

      3. Massage the Coded String to strip out the other table's Record Index Key (I have already setup the strip method to derive the desired record index key)

      4. Use the stripped out Record Index Key to perform a find for that record in another table and display the record in a preview form. (once I have found the record and constrained the set - I have all of the preview form portion completed)

       

      Note: Trying to keep the user isolated form the record table.

       

      Issues:

      1. How do I create a field in a form layout that will contain a variable?

      2. After massaging the Input variable into a 2nd Key Index variable...How do I assign the variable within a script to find the record index key in the other table?

       

      I think I am just too close to this one.

       

      Thanks

       

      Richard

        • 1. Re: Create layout for FIND, enter in data, massage data and lookup INDEX of a different table.
          StephenWonfor

          Richard

           

          You might want to step back a bit and give us a "management view".  Step way back.  Why is your search string so complex?  How many records are you searching?  Table Dancing on a modern computer is fast enough that is it unseen by the user so, instead of doing it all in one go you might consider the simpler path - variables are very low overhead - you can do many searches in many tables very fast with simpler criteria.  Tell us more...

           

          Stephen

           

          ---

           

          "The real problem is not whether machines think but whether men do." --- B. F. Skinner

           

           

           

          1 of 1 people found this helpful
          • 2. Re: Create layout for FIND, enter in data, massage data and lookup INDEX of a different table.
            RayCologon

            user12884 wrote:

            Goal:

              1. Create a Layout to have the user enter in a Coded TEXT String and press a scripted button for find the record they are seaching for.

             

            Hi Richard,

             

            Your use of the term variable notwithstanding, the conventional solution to your first problem would be to provide a global text field (eg defined in a utility or system table in your database schema) for users to enter their search criterion into.

             

            user12884 wrote:

              2. The Coded String is long and contains the Record Index (Key/number) of another table within the string.

              3. Massage the Coded String to strip out the other table's Record Index Key (I have already setup the strip method to derive the desired record index key)

             

            After entering their search string, users will click tehe scripted button you mentioned in Goal 1. It should be a relatively simple matter to have the script that is called by that button parse out the required record key from the entered string and transfer it to a local ($var) script variable - or elsewhere - with a single command on the first line of the script.

             

            user12884 wrote:

              4. Use the stripped out Record Index Key to perform a find for that record in another table and display the record in a preview form. (once I have found the record and constrained the set - I have all of the preview form portion completed)

             

            A rather better way to accomplish this might be to use a relationship between the extracted record key and the related table, and simply place fields from the related table onto the layout so the relevant record will be displayed remotely - without any requirement to navigate to a layout based on the destination table, or to perform a find (the relationship will locate and display the matching record).

             

            user12884 wrote:

            Issues:

              1. How do I create a field in a form layout that will contain a variable?

              2. After massaging the Input variable into a 2nd Key Index variable...How do I assign the variable within a script to find the record index key in the other table?

             

            As noted above, a global text field will provide you with a suitable field for users to enter the required search string.

             

            If you need help forming a calculation that will parse the required key value out of the string users have entered, you might consider posting some examples of the full strings, with a description of the format and location of the keys within the string. I'm sure someone here will be happy to suggest some appropriate syntax to enable you to parse out the required index component.

             

            Regards,

            Ray

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

            R J Cologon, Ph.D.

            FileMaker Certified Developer

            Author, FileMaker Pro 10 Bible

            NightWing Enterprises, Melbourne, Australia

            http://www.nightwingenterprises.com

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