5 Replies Latest reply on Jul 17, 2014 3:23 PM by philmodjunk

    Date Range script not working. Please Help

    MUSTAF

      Title

      Date Range script not working. Please Help

      Post

           I build this script to find range of information base of a range of date. I ran the script but  it not doing what i want it to do.  when i run the script it take me to the date range layout but when i input my range of date it dont work.. If anyone can step through my script and let me know what i did wrong. thanks for your help.

        • 1. Re: Date Range script not working. Please Help
          RickWhitelaw

               You should post the script. Otherwise we can't help you find what isn't working.

          • 2. Re: Date Range script not working. Please Help
            philmodjunk

                 You can compare your script to the date range search script in this thread: Scripted Find Examples

            • 3. Re: Date Range script not working. Please Help
              MUSTAF

                   This is my script 

              • 4. Re: Date Range script not working. Please Help
                philmodjunk

                     Please carefully compare your script to the examples that I provided.

                     The date fields must have global storage specified.

                     Line two of your script should be Enter Find Mode [] and you usually would clear the pause check box that is automatically selected when you add this step to your script.

                     Set Field in line 3 is missing the target field parameter.

                     

                          When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

                     If [ DateRange::Find_beginning_date]

                     makes no sense as you do not compare it to a value and you appear to be checking the value of this field only after you use it to perform a find.

                     When I look at your script in its entirety, it would appear that lines 2, 3 and 4 should be deleted from your script and the first If step needs to have it's expression modified so that it works for the error message (which I can't read) you want to show when this expression is True.

                • 5. Re: Date Range script not working. Please Help
                  philmodjunk
                       

                            how can i apply it to different layout.

                       What do you mean by "apply it"?

                       Will this be a layout based on the same table or a different table?

                       It's possible to use functions such as Set Field By Name to indirectly refer to a specific field via a table Occurrence::field reference created by a text calculation and it's possible to use the "layout name by calculation" option in go to layout to indirectly refer to layouts.

                       But the results produced will very much depend on the context established by Tutorial: What are Table Occurrences? specified in "Show Records From" for the specified layout.