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.

Searching Time Fields

Featured Replies

  • Newbies

Morning all - I have a time field that I'd like to able to search with. By hand I can enter "<14:00" to mean earlier than 2pm which works fine but I can't seem to script the same search. No matter how I try and get my script to enter "<14:00" or what function I try and pass it through it never makes it into the field during the search process. Any help or suggestions would be appreciated.

Mark.

Are you using SetField in your scripts? If so, this will not work as Set Field requires the argument to be in the same format as the destination field. You need to use InsertCalculatedResult instead and also make sure you have un-checked all the restore options in the Find script steps - so your script might look like:

Enter Find Mode []

Insert Calculated Result [Time Field, "<" & TimeToText(YourSearchTime)]

Perform Find []

You can do a similar thing with ranges, so the middle step of the script would be:

Insert Calculated Result [Time Field, TimeToText(StartTime) & "..." & TimeToText(FinishTime)]

If you download the Handy Bits file in the samples section of this forum, there are a lot of example calculations for ranges (mainly date ranges) when using this script step.

  • Author
  • Newbies

Thank for the reply Russ. But that didn't seem to help my case at all. Let me show you whats going after your suggestions.

Insert Calculated Result [select, "StartTime", ""<" & TimeToText ("14:00")"]

The idea being to try and find all records with a start time earlier than 2pm. I've put a Pause command after that Insert to see what it actually inserts into the find request. The field StartTime gets populated with "<0:23:20" but without the quotes. Can you tell me where I'm going wrong ?

I don't think you need to use the timeToText function... just "< 14:00" should be sufficient, because it's just inserting text as if you were typing...

but if you do use the TimeToText function, it would probably have to have the Time function embedded like this:

TimeToText( Time(14,0,0) )

  • Author
  • Newbies

Dropping TimetoText() worked perfect Jason. Thanks allot.

If you want to hard-code the 1400 time, then use this script step.

Insert Calculated Result [select, "StartTime", ""<14:00:00""]

My post assumed that you were selecting a time from a field, rather than hard coding it.

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.