Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Insert last year's date (just the year) in a sentence

Featured Replies

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 . . ."  

 

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.

  • 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

Date ( Month ( Get( CurrentDate )  ) ; Day ( Get(CurrentDate ) ) ; Year (Get(currentdate ) ) - 1 )

  • 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.

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

 

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.

Sorry Tom,

We fix the need by using a number field and merge field.

Lee

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.