Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is it possible to set the variables through Document triggers when a value in the field is selected?
I have a Year field which has four values.2011 to 2014. requirement is- when a value in the year field is selected, lets say when i select 2014,the variables vStartDate should get the value 01/01/2014(YearStart) and vEndDate should get the value 12/31/2014(YearEnd).
values should change accordingly when different year is selected. these variables are used further in the Set Analysis for YTD calculations.
I have tried the document triggers->field event trigger->OnSelect triggers. it is not giving me proper results. i have attached the sample. please help me resolve this.
Thanks a lot in advance.
Jyothi
Hi Jyothi.
Is this ur requirement? Check the given application.
Regards,
Kavita
Hi Jyothi.
Is this ur requirement? Check the given application.
Regards,
Kavita
Hi
Rather than using triggers, define dynamic variables like this.
Defined these in script using: (the double = is not a typo)
Set vStartDate = =MakeDate(Max(Year), 1, 1);
Set vEndDate = =MakeDate(Max(Year), 12, 31);
or define in the variable overview (the = is part of the variable)
vStartDate:: =MakeDate(Max(Year), 1, 1);
vEndDate:: =MakeDate(Max(Year), 12, 31);
HTH
Jonathan
Hi Kavita,
Thanks.. Thats what i wanted.. Could you explain how u did it?
Hi,
I just created two variables as per ur requirement u wanted Start Date and EndDate of the selected year.
As you don't have Date field, I used MakeDate Function.
For Start Date : Makedate( Year,1) for Jan
For End Date : Makedate (Year, 12) for Dec
Here you have my proposal
Thank you
Is it possible to default the variables to current year start till Today() when the year selection is cleared?
Yes, here you have
What is the best response?
Yes..
For Start Date : Makedate( max(Year),1) for Jan
For End Date : Makedate (max(Year), 12) for Dec