6 Replies Latest reply on Sep 11, 2009 12:13 PM by jluca

    Can Set field have an not statement

    jluca

      Title

      Can Set field have an not statement

      Post

       

         

       

      Could set field have a not statement in it.  Meaning could it not equal something. 

       

      I have a script look like this but i want it not to equal this user jluca.

       

      Set field [Purchase Order:Request by;"jluca"]

       

      Thanks for the help

      Jluca

        • 1. Re: Can Set field have an not statement
          philmodjunk
            

          And what would that value be?

           

          any value other than "jluca" would make

           

          Purchase Order :: Request ≠ "jluca"

           

          a true statment.

           

          Thus, Set field [Purchase Order:Request by;""]

           

          would appear to produce the results you want. If this is not what you want, perhaps you could give an example?

          • 2. Re: Can Set field have an not statement
            jluca
              

            Sorry Let explain futher. Still learning the program.  

             

            I have a list with two fields. One field is call approve and other is request by.  

             

             I want to see all user results but not jluca unless approve = yes. 

             

            What would be the best way to make a script?   I was look to use a setfield script as a not.= jluca so go something like this

             

             

             

             

            SetField [Purchase Order: Approve;"yes"]

            New record/ request

            setfield [Purchase Order: Request by;jluca]  ***trying to make this a not statement

            perform find []

             

             

            Thanks for the help

            Jluca

            • 3. Re: Can Set field have an not statement
              philmodjunk
                

              In a find, you can set an "omit" request.

               

              Enter find mode []

              SetField [Purchase Order: Approve;"yes"]

              New record/ request

              setfield [Purchase Order: Request by;"jluca"] 

              SetField [Purchase Order: Approve;"="]

              Omit Record/Request

              Set Error Capture [on]

              perform find []

              Set Error Capture [off]

               

              Notes:

               

              The Omit request omits all records from the found set matching your find criteria. Putting a lone "=" in the Approve field specifies that this field is blank. So the second request states Omit all records where Request by = jluca and the approve field is blank.

               

              Set error capture suppresses the "no records found message" that automatically appears when no records match the specified find criteria.

              • 4. Re: Can Set field have an not statement
                jluca
                  

                Thanks for the info but....  

                 

                Cant find script omit record/Request.  It not under Record and omit record doesn't give me an option.  

                 

                 

                Enter find mode []

                SetField [Purchase Order: Approve;"yes"]

                New record/ request

                setfield [Purchase Order: Request by;"jluca"] 

                SetField [Purchase Order: Approve;"="]

                Omit Record/Request

                Set Error Capture [on]

                perform find []

                Set Error Capture [off]

                 

                Thanks:smileyhappy:

                • 5. Re: Can Set field have an not statement
                  mrvodka
                    

                  It is just:

                   

                  Omit Record

                  • 6. Re: Can Set field have an not statement
                    jluca
                      

                    Thanks for all your posts!