Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
My requirement is to default current Quarter based on systems date.
I have a table which will give me the quarter name for every year and month. I loaded the complete data from table in the script and trying to default current quarter using Document open triggers.
my data in table is like this:
FISCAL_DATE | FISCAL_YEAR|FISCAL_QUARTER_NAME|FISCAL_MONTH
01-Jan-2013 2013 Q1 01
02-Jan-2013 2013 Q1 01
...
...
..
31-Jan-2013 2013 Q1 01
01-Feb-2103 2013 Q1 02
..
..
31-Dec-2013 2013 Q4 12
and this is how my expression is:
=if(FISCAL_YEAR=Year(Today()) and FISCAL_MONTH=Num(Month(Today())),FISCAL_QUARTER_NAME,Null())
this is not defaulting my current quarter and couldn't figure out why.
Do we need to use set analysis for this?
Thanks
Ramakanth
HI
Try like this
In Document properties -> OnOpen
Action -> Select in Field
Field
FISCAL_QUARTER_NAME
Search String
='Q'&Ceil(Month(Today())/3)
Hi,
Thanks for the response,this works when fiscal year is matching with calendar year.
For example: my fiscal year may start from Apr-March where Apr-Jun is Q1, Jul-Sep is Q2, Oct-Dec is Q3 and Jan-Mar is Q4.
I should be able to handle both cases, so we have a table which will tell us the Quarter based on the Fiscal year and month. So I would prefer to query the table to know my quarter rather than calculating from Today() date function.
Ramakanth