1 Reply Latest reply on Aug 15, 2015 11:32 AM by philmodjunk

    How to include the specified date in the script?



      How to include the specified date in the script?


      Hi All!


      Im stuck at this problem, i would like to include a specified date inside a script which will then find the other files based on another field.


      This is on a List View of all records.


      what im doing right now is using the "Find" to find the Items based on the Date.

      1. I Click the Find and i search the date eg 8/8

      2.This will show all the Items with 8/8/2015 date

      3. The user will then check Items that needs to be exported to excel

      4. Next, I have a button that would find the checked Items and Export it to excel

      The script is

      Constrain Found Set []

       Enter Find Mode []

      Perform Find [Restore] - (The find request is any LINE ITEM::export = "1")

      Export Records []


      So far, it can export the records with "1", the problem is that it exports all the records with "1", i would just like to export records with "1" and the specified date (searched date)


      e.g if the user search for date 8/8 and run the export button

      it will only export all records with date 8/8 and "1"


      How can i do this?


      Thank You!

        • 1. Re: How to include the specified date in the script?

          Set up a global date field where the user enters or selects the desired date.

          Enter find Mode [] ---> clear the pause check box in the script step
          Set Field [Line Item::Date ; Globals::gDateField ]
          Set Field [Line Item::export ; 1 ]
          Set Error Capture [on]
          Perform Find []---> there is no stored criteria in this step

          I am guessing as to which table has the date. If the date is in a related Invoice or Purchase Order table, you can specify that field in the first Set Field Step.