Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8161 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

Posted

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.

This topic is 8161 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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