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.

number range find request - fmp5/6

Featured Replies

Hi guys

I'm having trouble structuring a find request.

I'm trying to return companies from our database where the first character is a number.

I don't want to do 10 individual find requests so I thought of trying to use the ... range find symbol.

Doing 0...9 returns companies where there's a number from 0-9 in the field somewhere.

I've tried doing ==0...9* to try and return the companies where the first character of that field is a number, but with no luck.

I'll also need to try and structure this find in CDML syntax as well.

Any ideas on how to do this?

Thanks

Ben

Have you tried 0*...9* for your range. you didn't tell us what the result of ==0...9* was.

  • Author

The result of ==0...9* was 'no records found'

That's the one that I thought should work.

I've just tried ==0*...9* and I get 'no records found'

When I try just 0*...9* I get all records returned containing a number in that field.

I'd think a range request relates to the field's index, so that there would be no way to specify only the first character as a range. If this is a required feature, you may want to define a FirstLetter calculation field. Here you can decimate the 0-9 range to a single character.

I just made a little test file. Doing a manual find 0*...9* works.

The following script also works:

Enter Find Mode []

Insert Text [select, "Name", "0*...9*"]

Preform Find []

I have Names Starting with numbers, without numbers and with numbers in text other than starting position. It find only those with numbers in the first character of the name.

  • Author

Unfortunately when I try writing a script to do that it doesn't work.

It doesn't work as a CDML query either...

&-Op=bw&COMPANY NAME=0*...9*

I don't really want to have to create another field in our database just for this. It's overrun with fields like that already.

I might just set it up as 10 find requests - means it will be a massive CDML string.

Ralph is correct, and the script works (and it works with Set Field[] as well).

  • Author

Ok I've solved it in a rather crude way, but it works.

I search for &-Op=bw&COMPANY NAME=0*...9*

and it returns all COMPANY NAME with a number in.

Then I check the value of company name to see if it is less than or equal to 9 on the CDML format page.

If it's greater than 9, then it's not a number and I don't show anything.

Seems to be working.

Thanks for your suggestions guys.

Ben

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.