Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date field (CallDateMonthYear) that displays as 'MMM-YYYY'. On opening, I want to auto select this month (for example Sep-2018) and LAST month (Aug-2018). I've tried a few different things and am totally lost. Suggestions??
You can try an OnOpen trigger under Settings - Document properties - Triggers with a Selection - Select in field action:
='('&Date(Today(),'MMM-YYYY')&'|'&Date(Addmonths(Today(),-1),'MMM-YYYY')&')'
You can try an OnOpen trigger under Settings - Document properties - Triggers with a Selection - Select in field action:
='('&Date(Today(),'MMM-YYYY')&'|'&Date(Addmonths(Today(),-1),'MMM-YYYY')&')'
Worked! Thank you!
So. Going back to the well one more time...I have another field that gives me week ending dates and they are formatted 09/08/2018 for example. I tried the same concept but to select that field using this:
='('&Date(WeekEnd(Today(),-1),'MM/DD/YYYY')&'|'&Date(WeekEnd(Today(),-2),'MM/DD/YYYY')&')'
but it DOES NOT work for some reason. I put this in a text box to see if it was giving me the right results and it did (the expression you provided which is working as expected to limit the results to current and previous month is in the bottom text box and the expression above is in the top text box:
But when I do the exact same steps to put that as the search string for selecting the other field (CallDateWeekYear) it only shows the FIRST week in that range and not both. Since partial weeks are giving numbers that distort trend lines, I'm going for last full week and the full week prior to that...
Do you have any other selections present when applying that action?