Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody!
I want that everytime I open my dashboard, the more recent date is selected. The field i want this date is selected is named '-MonthYearMC', the format of the date of this field is 'MMM YY'.
I try in document properties>triggers>OnOpen>Select in field. but i have no luck .
I'll attach the script of the master calendar where my field is created.
Hope you could help me, thanks in advance.
PS: Have in mind that the date is always updating with more recent data.
Sofia, I need a little more information here in order to try to figure out if there is something we can do here. I did want to point out to you that the OnOpen trigger is an unsupported trigger in the Ajax Client, this is documented in the following Help link:
Just off the top of my head, I am thinking the better way to go at this may be to set a variable in the script and then use the variable to set the date etc... My post will kick this back up in the list, so someone else may have something better, but I think that is going to potentially be the better way to go here, but I do not have an example for you. If you have not searched the prior posts, you may want to do that, as I am pretty sure there are other posts out there along these lines too. I would do it for you, but you know your use case better than do I, so I will let you have a look to see what you can find, and if you do find something but have further questions, just post that link back here and pose your question and hopefully one of can try to help you further.
Regards,
Brett
In as much as your field is text will do that:
Month(TempDate) &' '& Right((Year(TempDate)),2) AS[-MonthYearMC]
I would suggest instead creating the field in this manner:
Date(Floor(TempDate),'MMM YY') as [-MonthYearMC]
This will retain a numerical value and should fix your issue.
V/r,
John