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

Trying to perform a find by using to date fields


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

Recommended Posts

Posted

Ok I give up....

I've searched the forums up and down and still can't can get it.

My Script is:

Enter Find Mode[]

Set Field[Adress Book::ExportDate; "<=" & Address Book::CreationDate] [color:purple]{I've tried switching the field names around also}

Perform Find []

All I'm trying to do is find all records created (i.e. field name-CreationDate) after the last date I exported the records(i.e. field name-ExportDate)

But when I run it I get the prompt that no records meet the criteria message.

When I run the scripted editor the field is empty

I don't understand why? I've seen this type of format in many examples that are posted.

Before any one asks, yes both field are of type date.

If I take out the reference to the second field and replace with a date (i.e. "01/01/2006") it works ok

So what I'm I missing.

Thanks for the help in advance...

Posted

Try and remove the ampersand from the expression.

Enter Find Mode[]

Set Field[Adress Book::ExportDate; <= Address Book::CreationDate]

Perform Find []

Posted

Tried that but I get an error when I try to exit the calculation area..

An Operator (e.g. +,-,*,...) is expected here.

So it seems to need it.

any other ideas?

Posted

When you are in Find mode, you are not in any record, so data from fields in records is not available (except for global fields). Therefore you need to get the data you want to use in a request, and put it somewhere where you can get at it after you enter Find, for example:

Set Variable [ $lastExport ; Address Book::ExportDate ]

Enter Find Mode [ ]

Set Field [ Address Book::CreationDate ; "≥" & $lastExport ]

Perform Find []

You can also use a global field or the script parameter to "park" the data.

Posted

I am trying to do the same thing and I can't seem to get it to work. I'm using v6. I am trying to find all of the records that have been modified(date field) since my last export (global date field)

I have in my script

Enter Find Mode[]

Set Field [">" & lastexport]

Perform Find

When the script runs it is only putting the date in, not the symbols. When I modify the Set field to

modified &">="& lastupdate

it just enters the first date and nothing else.

Can anyone help?

Posted

Hmmm...IIRC, in v.6 you can't use Set Field to set a date field to invalid date (">" is not a part of valid date). You need to use Insert Calculate Result (?) with the same formula. This also means that the target field has to be on the current layout.

Posted

thanks, that worked.

I had to enter

">="&DATETOTEXT(lastupdate)in order to get the date formatted correctly but that gave me the result I was looking for.

thanks again for your help.

Posted

I'm having a similar problem, but my example is even simpler, which leads me to believe I'm not formatting the find criteria properly. In the "Specify Find Requests" box, I've tried:

Table::field [global::gfield]

Table::field ["="global::gfield]

Table::field ["=="global::gfield]

and I get no records found each time. What am I doing wrong?

Oddly enough, I'm also getting an error code of 0 on these searches. Is it possible for a find to return no found records, but still return a 0 error code? Or am I really screwed up here?

Thanks...

mz

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