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.

Featured Replies

I've read all the existing posts on finding and have checked out the FM help site too but still no joy ....

So could someone help me please:

I want to be able to do a find in CDML to achieve the following:

(fieldA = X and fieldB = Y) or (fieldC = X and fieldB = Y)

Needless to say the real world problem has 6+ fields to search through but the principle must be the same. I can't figure out what to do with -op, -lop and exact match searches (if indeed these are part of the solution).

Any help is gratefully appreciated.

Graeme

  • Author

I've just had a thought. Can anyone tell me if this might be right:

Do an exact match with fieldB = Z

<input type=hidden name=fieldB value="==">

<input type=hidden name=fieldB value="Z">

Then do

<input type=hidden name =-lop value=or>

<input type=hidden name=fieldA value=X>

<input type=hidden name=fieldC value=X>

Desperately trying to understand...

Graeme

[ February 08, 2002, 04:48 AM: Message edited by: graemeaustin ]

  • Author

My suggestion did not work. Anyone got any better ideas?

Let;s start with the exact match you propose:

<input type="hidden" name="fieldB" value="==">

<input type="hidden" name="fieldB" value="Z">

First, note the additional quote marks. Get used to including them in this way. It will save you some trouble. This code assumes that you are hard-coding value Z and do not want the client to make any input choices. If you wanted the client to make the input choices you would write:

<input type="hidden" name="fieldB" value="==">

<input type="text" name="fieldB" value="">

----------

However using your hard-code choice (and assuming that you have all the required tags) I would start with an exact search of two fields:

<input type="hidden" name="fieldA" value="==">

<input type="hidden" name="fieldA" value="X">

<input type="hidden" name="fieldB" value="==">

<input type="hidden" name="fieldB" value="Z">

Then on your results format use an If conditional such that if records are found display the results else display the next set of search criteria.

With some creative coding you may also be able to set the If conditional such that found records are displayed and the next set of search criteria is displayed and is coded such that the found records are included in the next result.

Or you could do an exact search of all six fields at once.

I am reluctant to use the or with a logical operator. I think you will have real problems with that.

HTH

[ February 08, 2002, 05:51 AM: Message edited by: Keith M. Davie ]

  • Author

Thanks very much Keith - I'll try your suggestion: it certainly makes a lot of sense (I couldn't see how to use the or operator correctly!)

Graeme

Certainly Keith's suggestion of combinding the search with [FMP-If][FMP-Else] statements is what I would try first. However, you may also consider the use of a calculated field to construct the logic and report a condition of "True" or "False".

Then, do a CDML search on that result.

A couple of ways to skin a cat. wink.gif

Garry

[ February 08, 2002, 12:29 PM: Message edited by: Garry Claridge ]

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.