4 Replies Latest reply on Feb 14, 2013 11:13 AM by philmodjunk

    Searching a field by any word versus by first word

    med

      Title

      Searching a field by any word versus by first word

      Post

           I designed a screen for searching a table by persons name

           I tried two designs one by using a portal of the names table after I related it to globals table and the saerch field in the layout is the link between the globals table and the names table

           The other design is using a list layout of the names table and the searchfield is the same in the globals table but with an x relation. Then I have a script trigger on the search field in the globals table and I use 'on modify' to perform a find on the names table

           1. The problem that the users are experiencing is that when they type fast the system does not cope and characters are dropped.

           2. The other question I have is HOW CAN I force the search to be by first name rather than by any word.

        • 1. Re: Searching a field by any word versus by first word
          philmodjunk

               1) are you using a script trigger such as onObjectKeystroke or OnObjectModify to update the portal keystroke by keystroke? Some detail on what you have implemented here would be helpful.

               2) Put the first name in it's own field for searching purposes. You can use replace Field Contents to copy the first name into a separate field and make ths a permanent change to the design of your table and layouts or you can use a calculation field that extracts the first name and use it in your search.

               Searching a  calculation field that removes the word separating spaces from the field might also be used for this purpose, though the results will be slightly different from using a separate first name field.

          • 2. Re: Searching a field by any word versus by first word
            med

                 1. I am using the script trigger OnObjectModify and my find says globals::serchfield=peopletable::name

                 2. It is a pain to change the structure of tables after you have deployed it for many users. How do you usually do this (automated process if possible)

            • 3. Re: Searching a field by any word versus by first word
              med

                   I forgot to say I am using the script trigger only for the list layout solution not for the portal

              • 4. Re: Searching a field by any word versus by first word
                philmodjunk

                     I'd use the OnObjectSave trigger instead of OnObjectModify. OnObjectModify will trip the script with each keystroke. OnObjectSave will only trip when you modify the data in the field and then exit the field.

                     "deployed for many users". Does that mean you have distributed many copies of your database to different people or is this a database that is hosted over the network with many people using the same hosted database.

                     The first scenario makes this a bigger issue than the second.