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

Just Will Not Work

Featured Replies

Hi all

I am trying to write a script that will find a specific date depending on the current month. If it is October, November or December I want the find in the script to the 1st October and the current year. If it is the rest of the year I want it to find 1st October and the previous year.

My script is currently

Enter Find Mode

If(month(Today) >= 10

Set Field(Date Of Leaving,TextToDate("<1/10/" &Year(Today))

Else

Set Field(Date Of Leaving,TextToDate("<1/10/" & Year(Today) - 1)

End If

Perform Find

What am I doing wrong???

Please Help

Thanks

I think you're missing some brackets.

After your "else" try:

Set Field(Date Of Leaving,TextToDate("<1/10/" & (Year(Today) - 1))

note the extra brackets around (Year(Today) - 1)

Try Insert Calculated Result as opposed to Set Field.

...And make sure the date field you are calculating is on the current layout when the script executes.

... and use Status(CurrentDate) not the TODAY function.

I just noticed the TextToDate() function in there. TextToDate will break if the solution is used on a machine set to a different date format (eg, Australian instead of US). Use Date() instead.

So, putting it all together...

Insert Calculated Result [Date Of Leaving, "<" & DateToText(Date(1, 10, (Year(Status(CurrentDate)) - 1))]

  • Author

Thanks everyone I managed to overcome that problem........much appreciated

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.