4 Replies Latest reply on May 19, 2013 1:18 PM by Sorbsbuster

    Write a script to search up to end of month

    Mike_1

      Title

      Write a script to search up to end of month

      Post

           I need to use a search string in a script to find date fields that are "<= End of the current month".   What is the operator for the string? 

            

           Thanks!

            

        • 1. Re: Write a script to search up to end of month
          Sorbsbuster

               Try using Set Field after the Find step, and set it to be:

               "<=" & Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) )

          • 2. Re: Write a script to search up to end of month
            Mike_1

                 Thanks.. I will give it a try to see if it's will work for me.

            • 3. Re: Write a script to search up to end of month
              Mike_1

                   Hello sorbsbuster,

                      I tried the following tip you sent to me a few weeks ago and I am struggling with it. I tried to create a script and used the set field. I typed in the following   

                   "<=" & Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) )

                   into the calculated section ..  I get an error that a date is expected in that area. I have tried to use the Constrain Field funtion as well.

                   I need to search a string of dates " <= the end of current month".   Exp <=05/31/2013 , but need it calculated each month.

                   I have uploaded a pic of the error

                   Thanks

                   Mike

              • 4. Re: Write a script to search up to end of month
                Sorbsbuster

                     I can't see the context for where for have put that calculation, but if it is the script step, then it expects you to enter the calculation for the search criterion.  There are two distinct buttons at the bottom of the script-step window for that:

                     - you specify which field the criterion should be in.  That looks like you want it to be in the field aztecaccounts::next

                     - you then specify what the search criterion is.  Therefore you don't need to specify the field again.  Your criterion should just be:

                     "<=" & Date ( Month....etc