Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I use the following trigger to set a Year field selection to Variable1 if Year has no prior selection, or to its previous value. This works if only a single year is preselected. But if multiple years are selected, it fails. Any help would be appreciated.
=if(len(getFieldSelections(Year))=0,Year(Variable1),getFieldSelections(Year))
Thanks
This is close to perfect. I changed to:
=if(getselectedcount(Year)=0,Year(Variable1),'('&concat(Year,'|')&')')
Problem is each iteration adds a set of brackets, like (((2015|2016))) after 3rd time sheet is selected. or ((((((2015|2016)))))) after 6th.
What is Variable1 here?
Variable1 has the current date
So when multiple years are selected, then which would be the previous year? Lets say you selected 2017 and 2016, previous year will be 2015?
Try this
=if(getselectioncount(Year)=0,Year(Variable1),'|'&concat(Year,',')&'|')
Sorry, ignore above
It would be
=if(getselectedcount(Year)=0,Year(Variable1),'('&concat(Year,'|')&')')
This is close to perfect. I changed to:
=if(getselectedcount(Year)=0,Year(Variable1),'('&concat(Year,'|')&')')
Problem is each iteration adds a set of brackets, like (((2015|2016))) after 3rd time sheet is selected. or ((((((2015|2016)))))) after 6th.
Ok, That was the correct answer. The extra brackets were comming from an exit trigger I forgot to remove.
Ok,you can mark my answer as correct answer if it was helpful, have a good day:)