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.

Single search in multiple date fields

Featured Replies

In a data base, with several Text Fields, I can easily make a research in ALL fields with just ONE "Search Field". I simply create a calculated field with a formula like " Chain(TextField1) & Chain(TextField2) & ....", and place it in a request layout. In Find Mode, you can fill this only field and know that FmP will search in EACH field includes in the formula to extract the concerned records.

Here is my problem :

When I do the same with Date Fields (and of course modify the calculated field formula), FmP never find any record even if all fields contain the date I'm looking for !!!

Many thanks if you can help.

Patrick

It is not possible (as far as I know) to Script repeated Find Requests. this means that a scripted work around, such as 'tagging' each successively 'found' group (one date field at a time), and then eventually finding all the tagged records will be slow and tedious, and not always accurate either if there are multiple users trying to do the same thing.

A cleaner way, although not perfect, is to set up a Global date field, and create self-join relationships to each date fields you're looking for.

The 'viewing' layout would need to have a small portal for each self-join relationship, each one showing matching records for the selected global date field. Then you could do analysis on the numbers per portal, or together.

I do not know of way a to put them all in one portal unless you're predefining what you want to see by such functions as MIN(date) or MAX(date). Since dates are inherently numeric fields, they do not concantenate well.

HTH

It's the conversion of a formatted date into its internal numeric representation that makes these and other kinds of searches on date fields difficult.

But, you can script the search in multiple fields with multiple requests like this:

code:


Enter Find mode

Set Field [DateField1, gSearchDate]

# When in Find mode, the following step will create a new Find Request

New Record/Request

Set Field [DateField2, gSearchDate]

New Record/Request

Set Field [DateField3, gSearchDate]

New Record/Request

Set Field [DateField4, gSearchDate]

# Etc.

Perform Find


  • Author

Hi,

Many thanks to Bob and its good tip. Although his solution is not based on a "Calculated Field", I've been able to organize my search and to find a date, whatever the Date Field used.

Thanks again Bob,

patrick smile.gif" border="0

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.