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

Trying to perform a find by using to date fields

Featured Replies

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

Try and remove the ampersand from the expression.

Enter Find Mode[]

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

Perform Find []

  • Author

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?

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.

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?

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.

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.

  • Author

Thanks comment

That worked..

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

Create an account or sign in to comment

Important Information

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

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.