4 Replies Latest reply on Nov 4, 2012 9:07 AM by LaRetta

    Find mode default view

    petermontague1

      Is it possible to make find mode the default mode in a layout?

        • 1. Re: Find mode default view

          Hi Peter,

           

          I do not know of method of making Find the default.  The windows mode is not at the layout level.  You can use script trigger OnLayoutEnter with single step of Enter Find mode().  Be sure to include Enter Browse Mode() OnLayoutExit.

          • 2. Re: Find mode default view
            petermontague1

            Thanks. That works for me.

            One more question: if "no records match this find criteria" can I script to copy the find and paste it into a new record in a different layout?

            I know how to script to go to a new layout and add a new record. So I just need help with copying the find and pasting it.

            Peter.

            • 3. Re: Find mode default view

              You would need to know the fields they entered criteria into or you would need to loop all fields testing for value and then writing the field name and value to variable to then create a new record and fill the fields.  You could also use globals but here is pseudo-script concept:

               

              # first provide User ability to search

              Enter Find Mode [ pause ]

              Set Error Capture [ on ] ... stops error message

              Perform Find []

              If [ Get ( FoundCount ) ]. ... records found

              Go To Layout [ data-entry layout ]

              Exit Script]

              ... No records so create record from find criteria which still exists

              Modify Last Find

              ... Loop the fields looking for values and set variable

               

              But wait ... what if User enters name and address but the person has moved?  This type of automation works but has its limits.  What fields are on the find layout? 

              • 4. Re: Find mode default view

                Also keep in mind that using Modify Last Find would fail if the User had multiple find requests because it would only retrieve the last request.  Globals would protect from this but prohibit multiple requests unless you used repetitions to hold the multiple requests.

                 

                Usually however, only one request is executed by Users. But I thought I should mention it just in case it came up.