Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
On opening the document, I want to show the last two years to be selected as default.
I do have field named as Year.
Year
2012
2013
2014
2015
2016
So, when opening the document I want 2016 and 2015 should be selected.
Please advise.
Regards,
Mahamed
Hi mahamed,
1.- Create a variable like this: vEntrySelections = '('&Max({1}Year)&'|'&Max({1}Year)-1&')'
2.- On Document Properties -> Triggers -> Document Triggers -> On Open:
Field -> Year
Search String -> =$(vEntrySelections)
Regards!!!
Try like this :
Go to >Document properties > Triggers > On Open Trigger >select in Field
Select the Year field and write this expression
'('&Max(Year,1) &'|'&Max(Year,2)&')'
Create a trigger ,
Select the Year field
expression
='>=$(Variable1)'
where Variable1=max(Year)-1
Thanks
Khushboo
Hi Khushboo.
Thank you for your kind response. But using your expression will give me only single year data.
You are using the Variable1=max(Year)-1 ie. the variable will store only max year -1
for example my max year is 2016 then your variable will store 2015 and on opening it will show single year only.
But, appreciate again for your kind response. ![]()
Regards,
Mahamed
HI, Mohamed
You might not understand the
expression
='>=$(Variable1)'
The above expression select all the values which are greater than the given value
here given value i.e. Variable1=max(Year)-1 = 2015 , so it will select 2016 and 2015 both
you can write the expresion directly
Did you tried my suggestion ![]()
Go to >Document properties > Triggers > On Open Trigger >select in Field
Select the Year field and write this expression
'('&Max(Year,1) &'|'&Max(Year,2)&')'
Go to >Document properties > Triggers > On Open Trigger >select in Field
Select Year field and write below expression in Value
='(' & concat(distinct {<Year={">=$(=max(Year)-1)"}>} Chr(34) & Year & Chr(34),'|') & ')'
Hi mahamed,
Try this Way
Go to >Document properties > Triggers > On Open Trigger >select in Field
Field : " Year "
Search String : " ='(' & (vYear1) & '|' & (vYear2) & ')' "
Here,
vYear1=Max(Year)
vYear2=Max(Year)-1