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.

Set Field with Date Calculation

Featured Replies

Hi -

I have a script where the first section does a find for me. I have created the find using Set Fields. One of the Set Fields is on a Calculation(Date) field.

Set Field [NextInvoiceDateQuarterly, ">= Status(CurrentDate)"] - - - this is my line in ScriptMaker

When I run my script - just get a question mark in that field and I have to modify it manually or cancel my script.

I have tried changing the Set Field command to Insert Calculated Resut, but then it just literally enters ">= Status(CurrentDate)" and tells me I can't have that because the field is a Date field.

I want the field to be found on >= and the current date. I can do this manually - so I know there must be a way to do it within ScriptMaker.

Thanks for your help.

Hello!

That's a good question. I have one solution for scripting this action, but I'm not sure if it's the best. If Someone has a better one, let me know because I am looking for something a little simpler. There is also another easier alternative that is listed at the end of this post.

Anyway, it looks like this:

Enter Find Mode [ ]

Go to Layout [Layout you're date field is on]

Insert Calculated Result [NextInvoiceDateQuarterly, ">="]

Insert Calculated Result [NextInvoiceDateQuarterly, " Date( Month(Status( CurrentDate)) , Day(Status( CurrentDate)) , Year(Status( CurrentDate)))"]

Perform Find [ ]

Make sure that you DO NOT "Select Entire Contents" on the Insert Calc Result script steps, and you do not restore find requests. The reason why it won't work the way you have entered it is because the "" marks insert the exact phrase you put in, which is not a date.

Now, you do have another simpler option. I just wanted to post that other stuff to maybe get some other people's feedback.

You can do your find manually, then, right after, go to scriptmaker and make a script that goes like this:

Perform Find [Restore]

That's all. It will perform your last manual find.

Have fun!

Ken

You were almost there...

Enter Find Mode []

Insert Calculated Result[NextInvoiceDateQuarterly,">=" & DateToText(Status(CurrentDate))]

Perform Find []

You can't use Set Field because set field requires that the output be in the field format of the destination field, so ">=3/4/2002" is not a date - but Insert Calculated Result will let you do this.

HAHA

I've tried TextToDate and it didn't work, but for some reason I never thought about DateToText!! Thanks! That solves alot of problems for me!

Ken

  • Author

Wow -

That worked wonderfully!!! Thank you for your help.

Now - I have some sorting issues to work through - but those shouldn't be a big deal.

Thanks again

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.