5 Replies Latest reply on Dec 11, 2011 8:38 AM by RMckeown

    finding changes existing record



      finding changes existing record


      A user wants to seach by surname field. They click in the field, overwrite the existing entry with "Smith" and press the find button.

      That clears the record, so they enter "Smith" again and perform the search successfuly. However, they do not realise when they overwrote the surname in the first instance, it changed the record. Now a record has the wrong surname.

      I realise this is user error, but easily done. Is there a work around?


        • 1. Re: finding changes existing record

          you could not allow access to the fields in browse mode.  This would prevent users from accidentally overwritting the data in the fields, they would still be able to enter the text in find mode.  Then you would need a separate layout for editing contact for those times you did want to make changes or add new contacts.

          • 2. Re: finding changes existing record

            If interested, you can also use the OnObjectSave script trigger to run a script that asks: "Keep this permanent change to the field?" in a custom dialog. If they click "no" or "cancel", you can revert the record.

            I prefer to set up global fields separate from the actual fields and use them for performing searches of the database. They click a button that switches layouts or opens a new window where they have global fields for entering search criteria. Then they click a button on this layout to perform the find. Physically separating the data entry and search tasks on separate locations helps reduce the frequency of this mistake.

            • 3. Re: finding changes existing record

               I like your idea of setting up global fields to seach - but I cant work out how. The manual says you cannot search on a global field


              • 4. Re: finding changes existing record

                You don't search on the global field, you take the criteria in them and use the criteria to search on your non global fields.


                Say you put a single global text field, gUserName, on your search layout.

                This script could search for all records with the entered/selected user name:

                Enter Find Mode [] //clear the pause check box
                Set Field [YourTable::UserName ; YourTable::gUserName ]
                Set Error capture [on] //keeps error dialog from interrupting the script if no records are found
                Perform Find[]

                The set field line sets up the search criteria, copying it from the global field, gUserName into the non global UserName field. This step will not work if gUserName does not have global storage specified.

                • 5. Re: finding changes existing record

                   perfect - thanks so much