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

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

Recommended Posts

Posted

Hi,

I have a bunch of records that each have a target date field. Is there a way that I can dynamically find the records that have a target date in the next 7 days? I can't hardcode any dates in there.

I know I can find target dates after today by finding records where the date > //, but I can't seem to omit < // + 7 or do any date manipulation with dates in the find criteria.

Thanks.

-Chris

Posted

Hi

you have to make 2 requests !

You can do it in find mode, with the first request being >// and the second being >12/06/2005 (omitt).

For repetitive tasks it will be better to make a script !

Posted

I am still learning scripts. I went in and wrote this script that you gave for an example and I keep getting errors. This is what I am getting.

An operator (e.g.+,-,*,...) is expected here. It highlights everything from Get(CurrentDate) to the end of it.

I am in scriptmaker and I double click SetField then I go to calculation and type everything in that you gave the example for. What am I doing wrong? Thank you.

Posted

You are probably pasting in the brackets "[" "]", you only need to paste this:

Get (CurrentDate) & ".." & Get (CurrentDate) + 7

In the calculation box.

HTH

Lee

Posted

I think it's a pretty common error at first ...

Everything inside the Set Field is being placed in the calc box, even according to his description of what he is doing "I double click SetField then I go to calculation", as:

yourTable::yourDatefield ; Get (CurrentDate) & ".." & Get (CurrentDate) + 7

You need to FIRST select Specify Field and enter your field name as indicated by everything before the first semi-colon. Only the last portion AFTER the semi-colon should be put in the calc box as Lee indicated, or:

Get (CurrentDate) & ".." & Get (CurrentDate) + 7

Posted

Thank you. That worked when I just put in the Get (CurrentDate) so forth.

I was going by the first script that showed to put in the table and the field so I put the folloing.


Set Field[]



Then I clicked on calculation and put this in:



Rifles::Date Sold;Get(CurrentDate)&".."& Get(CurrentDate)+ 7

That is when the error popped up. It looks like it works without the Rifles::Date Sold. But what would happen if I needed it in there? Is there another way to do it?

Posted

"it works without the Rifles::Date Sold. But what would happen if I needed it in there? "

As I explained above there are TWO parts to a Set Field[] script step:

[color:red]1) The field to set (button says Specify Target Field)

[color:blue]2) Set with what (button says Calculated Result)

Set Field [ [color:red]yourTable::yourDatefield ; [color:blue]Get (CurrentDate) & ".." & Get (CurrentDate) + 7 ]

LaRetta :wink2:

This topic is 6933 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.