January 10, 20187 yr Every January, I send out a note referring to the previous year. Is there a way to have the previous year inserted automatically in the sentence? ex. "Total number of hours served in 2017 . . ."
January 11, 20187 yr Why not create a field for the year, it could be just a number or use the year function. Year (yourDate::Date ) and then merge either of those Fields.
January 11, 20187 yr Author Thanks for the quick reply. Sorry, I'm not quite getting what I should do. I'm able to insert just the current year into my sentence using {{CurrentDate}} , formatting out the month and day. So my sentence now says . . . Total number of hours served in 2018: I need the sentence to say . . . Total number of hours served in 2017: Is there some way to impose a calculation on the {{CurrentDate}} ? Something like {{CurrentDate}} - 1
January 11, 20187 yr Date ( Month ( Get( CurrentDate ) ) ; Day ( Get(CurrentDate ) ) ; Year (Get(currentdate ) ) - 1 )
January 11, 20187 yr Author I'm so sorry. I'm obviously missing something. Maybe I need to explain myself better. In my annual letter that I send out each January (it's in Layouts), there's a phrase in one of my sentences that says (this is in the Layout Mode), "Total number of hours served in {{CurrentDate}}: When I go into the Browse mode, that phrase becomes, "Total number of hours served in 2018:" I need to have a phrase that says, "Total number of hours served in 2017:" So in the Layout Mode, what does that sentence need to look like? When I tried the formula you typed above, it wasn't generating anything when I went back into the Browse Mode. Also, you have listed Month and Day . . . I only need the year. Thanks.
January 11, 20187 yr Hi sdutton, I understand what you are asking, and I think this is more of how to implement it. Why not post a copy of your file or a mock up of it, so we can see your schema? Lee
January 12, 20187 yr Is your text in a text object? I.e., it's not in a field, it's directly on the layout? You can't perform calculations directly in text objects. In order to use the calculation you want -- Year(Get (CurrentDate))-1 -- you'll need to create a calculated field (or a field where you set the calculation using auto-entry or a script, or use a script to set a global variable). Make sure the storage of the calculated field is set to unstored so it will always update. You can then use Insert > Merge Field (or Merge Variable) to insert the field or variable into your text.
Create an account or sign in to comment