June 22, 200520 yr 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
June 22, 200520 yr Have you tried 0*...9* for your range. you didn't tell us what the result of ==0...9* was.
June 22, 200520 yr 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.
June 22, 200520 yr 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.
June 22, 200520 yr 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.
June 22, 200520 yr 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.
June 22, 200520 yr 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