2 Replies Latest reply on May 15, 2012 7:11 PM by JantzSelk

    value list find script

    JantzSelk

      Title

      value list find script

      Post

      Hey everyone, i'm looking to perform a find that constrains all records that have a particular day of the week in the field "Package::Deliveryday" with the days for this field selected from a value list and range from monday-friday. The problem i'm running into is that i don't want to use 5 different find criteria for monday, tuesday, wednesday etc rather i was hoping to use a global field and "set field" script step in order to accomplish this in a more efficient way but nothing has worked so far. I may be out in left field in the way i'm going about doing this so any guidance to get me back on track would be greatly appreciated! 

       

        • 1. Re: value list find script
          philmodjunk

          A global text field set up with a value list of day of the week names should work for you. Let's say that field is called gSelectedDayName. I am also assuming that DeliveryDay is a text field and not a date. A different script would be needed if that field is a date field.

          Go to Layout [package]
          Enter Find mode[] //clear the pause check box
          Set field [Package::Deliveryday ; YourTable::gSelectedDayName]
          Set Error Capture [on]
          Perform Find[]

          It is possible to perform this scripted find on other layouts not based on the Package table, but then the relationship between that layout's table and package must be one that works for the find you are performing. If that's the case, you'll need to describe your database and layout in more detail.

          The script will not work unless gSelectedDayName has global storage specified in field options. It can be defined in any table in your database.

          • 2. Re: value list find script
            JantzSelk

            Thanks Phil, I had the script right but like you mentioned i needed to adjust a couple table relationships. It works like a charm now!