Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a list who contains 5 elements (2008, 2009, 2010, 2011 and 2012) I'd like to limit the user to select only 2 of them of each time, as (2008, 2009) or (2009, 2011). Is it possible?
If it's not possible, there's a way to get only the 2 majors selected? If the user selects (2008, 2009, 2011) I'd like to get (2009, 2011), this is possible?
Thanks in advance,
Eric
You could create a field event trigger (settings -> document properties -> triggers) and then create an OnSelect action for that field e.g. Year.
Select as action type Selection -> Select in Field
Then enter your field name in the field entry box
Year
(no equal sign, just the field name), and as search expression:
=if(GetSelectedCount(Year)>2,'('&max(Year)&'|'&max(Year,2)&')', if(GetSelectedCount(Year)>0,'=Year',NULL()) )
Hope this helps,
Stefan
You are probably displaying some charts based on the user's selection.
In the chart you have 'Calculation condition' property on General tab. You can put a condition there like "count(distinct Year) = 2".
Then press 'Error messages' button on the same tab in the chart properties and add some user friendly error message for the 'Calculation condition unfulfilled'. Something like "Please select two years only".
Hello Masha, thanks for the help.
there's a way to get only the 2 majors selected? If the user selects (2008, 2009, 2011) can I get (2009, 2011)? This is possible?
thanks,
Eric
You could create a field event trigger (settings -> document properties -> triggers) and then create an OnSelect action for that field e.g. Year.
Select as action type Selection -> Select in Field
Then enter your field name in the field entry box
Year
(no equal sign, just the field name), and as search expression:
=if(GetSelectedCount(Year)>2,'('&max(Year)&'|'&max(Year,2)&')', if(GetSelectedCount(Year)>0,'=Year',NULL()) )
Hope this helps,
Stefan
Hello swuehl,
this works perfectly, thanks.
Eric