Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm looking for a macro : when I select a year it selects selected year and the previous year.
Any idea is appreciated.
Thanks,
hi,
For me, it work correctly.. Can you post a file?
Don't us a macro. Use a OnSelect Action for the field (Set in Document Properties Triggers pane).
Use Toggle Select as the action.
For the field value use
=only(Year)-1
-Rob
Thanks Rob,
But I want to select the selected year and previous year at the same time.With Toggle select , it selects only one at a time.
Thanks
Hi,
Try like this,
Document properties ->Triggers ->Field in event trigger -> Year
OnSelect ->Action->Select in field
Field ->Year
SearchString-> ='(*'&vT1&'*|*'&vT&'*)'
Where vT1 => Max(Year) and vT => Max(Year)-1
Hope it helps
Sorry , it only selects the max(year)-1 ....
Thanks
hi,
For me, it work correctly.. Can you post a file?
My mistake, I used toggle select....
Thanks again..
...But I want to select the selected year and previous year at the same time.With Toggle select , it selects only one at a time....
When I test with V11, it retains the selection I make and the Toggle Selection adds the prior year. I get both years selected.
-Rob
Here is another problem now!
Let say if I want to select 2 years like 2008 and 2010 , how can I manage it?
Thanks
Hi,
OnSelect ->Action->Select in field
Field ->Year
SearchString-> ='(*'&vT1&'*|*'&vT&'*)'
Where vT1 => Max(Year) and vT => Max(Year)-2
or
Do you want to select 2008 and 2010 only,
='(*2008 | 2010*)'
Hope it helps