Date Parameters

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Date Parameters

Post by pbrad »

Hi,

I have a non persisted form that I am using to set search parameters for a query. I would like to pre-populate a date field with the first day of the current month.

I am not having any luck getting the 'default value' equal to anything more complicated that CURRENT_DATE. I have also tried to set an initialization rule which I would have thought should work but doesn't. My third approach has been to use a process. Could you please steer me in the right direction?

ENTER NEW SalesSummaryReportParameters WITH SalesSummaryReportParameters.FromDate=FIRST_DAY_OF_MONTH

Thanks,
Pete
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

An initialization rule approach should definitely work. Just make sure that you check "use in initialization" flag in the Advanced properties of the rule.

Do not use the process for this.
Aware IM Support Team
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Thanks,

I fiddled with the syntax for awhile before I found that putting CURRENT_DATE in the brackets makes it work:

If SalesSummaryReportParameters.FromDate IS UNDEFINED Then
SalesSummaryReportParameters.FromDate=FIRST_DAY_OF_MONTH(CURRENT_DATE)

Thanks,
Pete
Post Reply