Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5311 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've setup a report in my database to display records based on a date range. The problem im running into is pluggin the start and end dates into a script, have never really done any scripting with ranges of dates.

I have a field called "closed_date" which is the date i want to set a range for. Ive setup fields for ClosedDateStart and ClosedDateEnd and used those fields in a custom dialog. Here is the script i have so far:


Show Custom Dialog [ Title: "Input Date Range"; Message: "Please Specify the date range you would like to use ont he report"; Buttons: “OK”,

“Cancel”; Input #1: Investigation::ClosedDateStart, "Start Date"; Input #2: Investigation::ClosedDateEnd, "End Date" ]



Go to Layout [ “Case_Hours” (Investigation) ]



Enter Find Mode [ ][ Pause ]



Set Field By Name [ Investigation::Closed_Date ]





My question is how do i set the Closed_Date field to be a range of dates. 



Would i need to do something like:





> ClosedDateStart < ClosedDateEnd

Thanks for any help

Posted (edited)

Hello

You will first have to create two fields Start and End. Here is the script that I am using in my DB

Set Error Capture [ On ]

Show Custom Dialog [ Title: "Penny Log"; Message: "Please enter the dates that you'd like to search by.If you would like to search all records, leave the date fields empty.¶¶Valid dates

are :Start 1/9/2009 End 6/25/2009"; Buttons: “OK”; Input #1: main::Start, "Start"; Input #2: main::End, "End" ]

Set Variable [ $FromDate; Value:main::Start ]

Set Variable [ $ToDate; Value:main::End ]

New Window [ Name: "Search Penny Log"; Height: 600; Width: 600; Top: 50; Left: 200 ]

Go to Layout [ “pennylog” (pennylog) ]

Enter Find Mode [ ]

Set Field [ pennylog::Date; $FromDate & "..." & $ToDate ]

Perform Find [ ]

Show/Hide Status Area

[ Lock; Show ]

Move/Resize Window [ Current Window; Width: 855 ]

Halt Script

Hope this works for you, if not let me know.

Date.zip

Edited by Guest

This topic is 5311 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.