Dr. Evil Posted February 24, 2012 Posted February 24, 2012 Is there a technique or special character I can use to perform a "loose" find? i.e. Perform a find on "Randy Johnson" and find results would produce... >Randy Johnson >Amy Johnson >Dale Johnson >Dr. Johnson >Johnson's Family >Randy Travis >Randy Myers ---------------- With standard find a search on "Randy Johnson" would only result in... >Randy Johnson Any tips on this would be great! Thanks! :D
Vaughan Posted February 24, 2012 Posted February 24, 2012 Based on your example, perform a search with 2 find requests, one for "randy" and one for "johnson". Other than that, look into something like soundex. This may be over-kill, however, because it will probably return too many results. http://edoshin.skeletonkey.com/2006/01/soundex_and_mir.html
Lee Smith Posted February 24, 2012 Posted February 24, 2012 You want to perform an OR Find Enter Find Mode enter Randy in the First Name Field New Record Request enter Johnson in the Last Name Field hit the Return Key HTH Lee ps Vaughn, there is something wrong with your link.
LaRetta Posted February 24, 2012 Posted February 24, 2012 Hi Randy! To automate it, and considering that there may be more than two words in the list, it can look like this: Enter Find Mode [ pause ] Set Variable [ $string ; yourTextField ] // your text field is the field which the User enters their criteria Loop Exit Loop If [ Get ( FoundCount ) > WordCount ( $string ) ] Set Field [ yourTextField ; MiddleWords ( $string ; Get ( RecordNumber ) ; 1 ) ] New Record/Request Exit Loop Perform Find [ ] It takes the string and enters each word as a new find request making each word an OR as Vaughan and Lee are pointing out. Of course include error trapping as well if no records found but this is pseudo-script :^)
Dr. Evil Posted February 24, 2012 Author Posted February 24, 2012 Thanks! I understand the direction, but I'm failing to make it actually work. I have tried to make a working demo file, but getting the script to break down what User has entered and performing multiple finds on ea. part entry was trickier then I am witty. Here is what I have that IS working, tho it is only a simple find, not multi-find. loose_find_demoV01.fp7.zip
Vaughan Posted February 24, 2012 Posted February 24, 2012 It might be time to explain whet you're trying to do, not how you're trying to achieve it. :D
comment Posted February 24, 2012 Posted February 24, 2012 See if this helps: loose_find_demoV01 Copy.zip
Dr. Evil Posted February 24, 2012 Author Posted February 24, 2012 What I would be using this technique for is when user creates a new company, contact, etc... the script would check if this company, contact, etc. exist already before allowing a new record to be created. Basically an effort to keep duplicates down. Areas in a full blown database I'm allowing users to create Companies, Contacts, etc "on-the-fly" sort of speak. For example on an Invoice; user goes to set Wicked Cogs as Client, but Wicked Cogs does not appear in the list. From Invoice layout user can run a create client script to add Wicked Cogs to the database. But Wicked Cogs may already exist, but is only labeled a "Vendor" not a "Client". So script would find Wicked Cogs and allow user to set as both a "Vendor" and a "Client"
Dr. Evil Posted February 24, 2012 Author Posted February 24, 2012 Comment, thanks for the file... WOW WOW WOW! It was the "New Record Request" in the loop that threw me off. I did not know you could request to show more then ONE record in Find Mode. Cool! At the moment, the MiddleWords function is understood only as magic. How is this taking a one of the two or more words and separating into only one word per record? Thanks to EVERYONE for chiming in!
LaRetta Posted February 24, 2012 Posted February 24, 2012 It was the "New Record Request" in the loop that threw me off. I did not know you could request to show more then ONE record in Find Mode. It is not showing more than one record in find mode ... the script step is: New Record/Request which means that when in browse mode, a new record is created but when in find mode, a new request is created.
Dr. Evil Posted February 24, 2012 Author Posted February 24, 2012 It is not showing more than one record in find mode ... the script step is: New Record/Request which means that when in browse mode, a new record is created but when in find mode, a new request is created. Yes, this is what I was trying to say, my terminology is horrible at times.
comment Posted February 24, 2012 Posted February 24, 2012 At the moment, the MiddleWords function is understood only as magic. Each request takes one word out of the global search field. The first request takes the first word, the second request takes the second, and so on. 1
Recommended Posts
This topic is 4654 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 accountSign in
Already have an account? Sign in here.
Sign In Now