6 Replies Latest reply on Jul 9, 2009 7:32 AM by jluca

    Edit find request  Or statement.

    jluca

      Title

      Edit find request  Or statement.

      Post

      Kind of new at this, 

       

       

      I have a list and have two criteria.    

       

      I am using a find request script.   I want to find a request by = user name  or approve field = yes.

       

      In this field I can only use an and statement.  Is there anyway i can make a find an or statement??

       

      Thanks

       

       

        • 1. Re: Edit find request  Or statement.
          LaRetta_1
            

          To produce an OR statement, you need a second find request so you use the script step 'new record/request' which, when in find mode, adds a new request and when in browse mode, adds a new record.  So script would look something like:

           

          Enter Find Mode [ ] ... uncheck pause

          Set Field [ UserName ; Get ( AccountName ) ] ... (or whatever you are using here)

          NEW RECORD/REQUEST

          Set Field [ ApproveField ; "Yes" ]

          Set Error Capture [ On ]

          Perform Find [ ]

          If [ not Get ( FoundCount ) ]

          Show Custom Dialog [ "No records found." ]

          End If

           

          • 2. Re: Edit find request  Or statement.
            jluca
              

            Thank for the quick post.

             

            Everytime i do a set field i get this message.     No record match this set of find request.  I have set different field name with mult scripts but always get this message.   It like the set field not input the information in the field.   

             

            If i take the same information and do a find request it works with no problem. 

             

            Any ideas? :smileyindifferent:

            • 3. Re: Edit find request  Or statement.
              LaRetta_1
                

              "Everytime i do a set field i get this message.     No record match this set of find request.  "

               

              Do you mean "No Records Match This Request?"  If your script cannot find the same records you can find manually then you might be using Find Requests in addition (or instead of) Set Field[].  Does either Enter Find Mode[] or Perform Find[] have the words 'Restore' inside the brackets?  If you are using a find request, don't put quotes around the Yes when you type it in.  But if you are actually using a calculation to grab Get ( AccountName ) then you can't use a find request anyway.

               

              Please provide more information and your actual script would be the best (including listing any find request criteria if used).

               

               

              • 4. Re: Edit find request  Or statement.
                jluca
                  

                Ok let start over. 

                 

                When I use this script or your script  give me this message: No record match this set of find requests. 

                 

                Enter Find Mode []

                Set Field [Table::approve = "yes"]

                Perform Find []

                 

                 

                 

                When I use this script it works

                 

                 

                Go to layout ["p.o list"]

                Enter Find Mode [Restore]       *see below

                Perform Find []

                 

                 

                         * In enter find mode have a specify find request as

                 

                                action find        Table::Approve: [Yes]

                 

                 

                 

                Should this two script give the the same results???

                 

                Please Advice

                 

                Thank you for your time.

                • 5. Re: Edit find request  Or statement.
                  mrvodka
                    

                  jluca wrote:

                   

                  Enter Find Mode []

                  Set Field [Table::approve = "yes"]

                  Perform Find []



                   

                  Enter Find Mode []

                  Set Field [Table::Approve; "yes"]

                  Perform Find []


                  • 6. Re: Edit find request  Or statement.
                    jluca
                      

                    Rookie Mistake!   :smileyvery-happy:

                     

                     

                    Work perfect thanks for all your help.