Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want last month to be selected on opening the document. i also have other fields to be selected on opening the document.
Other field selections are working properly.But, last month is not selected because there is no data for last month for the selection of other fields.
I want to set last month selection as priority.
Below is the expression i am using. MonthYear =if(DATE(Max(date#(MonthYear,'MMM-YYYY')), 'MMM-YYYY')=month(TODAY()) & '-' &year(today()), DATE(Max(date#(MonthYear,'MMM-YYYY'))-1, 'MMM-YYYY'), DATE(Max(date#(MonthYear,'MMM-YYYY')), 'MMM-YYYY'))
What exactly are you testing here? May be this
=If(MonthStart(Max({1} MonthYear)) = MonthStart(Today()),
Date(MonthStart(Max({1} MonthYear), -1), 'MMM-YYYY'),
Date(MonthStart(Max({1} MonthYear)), 'MMM-YYYY'))
I guess you are using Select in Field trigger on MonthYear field, right... try this as the search string
=Date(MonthStart(Max({1} MonthYear), -1), 'MMM-YYYY')
Hi Sunny,
Thanks for quick response. In my case,i am going to use the below expression for field trigger. Please correct me if am wrong.
=if(Date(MonthStart(Max({1} MonthYear)), 'MMM-YYYY')=month(TODAY()) & '-' &year(today()), Date(MonthStart(Max({1} MonthYear), -1), 'MMM-YYYY'), Date(MonthStart(Max({1} MonthYear)), 'MMM-YYYY'))
What exactly are you testing here? May be this
=If(MonthStart(Max({1} MonthYear)) = MonthStart(Today()),
Date(MonthStart(Max({1} MonthYear), -1), 'MMM-YYYY'),
Date(MonthStart(Max({1} MonthYear)), 'MMM-YYYY'))