Jump to content

Find on first character


Eliz309
 Share

This topic is 6589 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi bob, wouldn't this give you the records for all files that contain a "G" in them, including words like filing?

What I would do instead, is to create a calculation field based on the your current field

Call it something like c_FirstLetter, with a text result,

Left(YourCurrentFIeld, 1)

then do your search in it.

HTH

Lee

Link to comment
Share on other sites

I think Bob's first answer is right, but there maybe more here than meets the eye. I just stumbled on something interesting while trying to figure this out. If I search FirstName for B it returns all the first names that start with B. Cool. This is what Martard was looking for.

I also have a calc field: Name = LastName & ", " & FirstName. In Name I Find for B and it returns all the records where either First or Last start with B.

Is this a hidden feature, or just news to me?

Dan

Link to comment
Share on other sites

I tried to be clever and have two find requests, the first with g* and the second omitting *g. But that didn't work. It did, however, shrink my found set by 400 records. I haven't figured out the difference in the two yet.

Link to comment
Share on other sites

Hi Queue!

What I was envisioning is:

Go To Field [Name]

Enter Find Mode[Pause] let user type a letter in Name field

Set Field [Calculation, NameField]

Perform Find [Replace Found Set]

I just got too excited to think of explaining it. frown.gif

LaRetta

Link to comment
Share on other sites

Hi -queue-

Very ingenus, but it will breaks on things like .gif

For a calculation field, yes. For an on-the-fly find, no.

I'm not so sure that this was suppose to be a on-the-fly find, but rather a way to find the first initials, in this case a "G", so that is why I posted the calculation approach.

Sorry, LoRetta, you weren't first.

Lee

cool.gif

Link to comment
Share on other sites

Err, that wouldn't work. George Gomez would get skipped.

It seems like this would almost have to be a find on a calculation field. I can't think of any way to only retrieve the first letter without excluding extra ones that you would want to find.

Link to comment
Share on other sites

I meant that the User can search their regular field (they don't need to know they're actually searching a calculation) and the calculation doesn't need to be displayed. Your calc is certainly better, Lee! smile.gif But I just got excited about using it to search a calculation from data entered in a regular field 'on-the-fly' as Queue put it. And I didn't think about the calc. smile.gif

But it does work! Except you'd want to use Lee's calc as mine is redundant. blush.gif I think it would be easier for Users than trying to remember all of the omits, symbols, etc, so I guess it depends upon what is wanted here.

LaRetta

Link to comment
Share on other sites

[color:"blue"] >That was it Lee...

^g

<g Omit

>h Omit

I don't understand? ^g shouldn't have made any difference.

I have tried all of your combinations, including the one you deleted, and none of them worked for me. At least it doesn't work on my version of FM 6

Lee

frown.gif

Link to comment
Share on other sites

Gee, I don't think you want to use <g (or >g) omits, because then George Boole would be omitted. Any record with *any* initial letter under G gets left out. Really, it seems you want to search a calc field that captures only the first word of your data field... No?

Link to comment
Share on other sites

Hi Vaughan,

Excellent!

Is this documented somewhere, or did you discover it through trial and error like the rest of us were trying to do?

This is a keeper. You can add to this (i.e. ==get*) and find all of the records that the first three letters are get, thereby narrowing your search even more.

Thanks for the tip.

Lee

cool.gif

Link to comment
Share on other sites

I thought I tried that last night, and it returned no records. Must have typoed or something. That's why I was messing with the omit second request step, because a single one wasn't giving me jack.

Anyway, thanks Vaughan!

Link to comment
Share on other sites

This topic is 6589 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.