Display name of LAST_MONTH

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Is there an easy way to display the name of the current or previous month in a pagetitle?
Some kind of merge syntax?
Photo of Matt Sones

Matt Sones, Champion

  • 31,904 Points 20k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,500 Points 10k badge 2x thumb
The only way I know for sure is to do a calculated Salesforce field that calculates the month of today then use that in merge syntax.
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Hi Matt,

Another way would be to add a Ui-Only field, "type = formula" and "return type = text" containing the following formula:

This produces the following output:

I'm not sure how to get the month name of the previous month using a formula function.
One way would be using a field of which you know that it has a date of the last month. You can add the field to the formula using the {{$Model.ModelName.data.0.date}} syntax instead of TODAY().
In the model you would load exactly one record which has a date from last month and you know that there will always be data in it.