Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Help please :-(

I'm trying to querry a database for various SIC codes. I have a field named SIC Code. My client wants me sort my database and locate 50 different SIC codes and I don't want to have to re-do the search 50 times. Is there a simple way to search by a string of all the SIC codes I want to find?

Your help would be GREATLY APPRECIATED!

Thanks

Ron Parker

[email protected]

Posted

Hi:

If you are asking how to sort, then the best thing to do is search the FileMaker Help for "Sort."

If you are trying to search for something, look in the FileMaker Help for "searching records."

After you have learned to do this, you can make a script immediately after performing the search or sort that will automate it the next time you want to do it.

For a sort, perform your sort, go to scriptmaker and create a script. Put the Sort [Restore] script step in there.

The process would be the same for search, except put the Perform Find [Restore] step in your search script.

Ken

Posted

Hi Ron,

Quick answer... you could do a scripted loop to take a list of 'find' items and paste (setfield) them into multiple find requests. The 'find' items could be in a global list and <return> delimited.

I'm not sure of your FMP experience and training... this could be complicated for novices.

Hope this helps... Good Luck!

Bob Kundinger

[email protected]

Posted

Ron ...

See attachment. It demos the multi-key approach that Bob Kundinger described in his post.

I assumed that you want to find Companies based on a "list" of SIC codes. That's what the demo does.

If you only want to assemble a list of target SIC codes, you can still use the multi-key approach. Simply change the relationship:

g_multiSICfind | Companies_SIC (the multi-key to Companies relationship)

to

self g_multiSICfind | SIC (a relationship of the multi-key field to the SIC field in your SIC database)

Good luck.

Multi SIC Code Search.zip

Posted

Wow! Jim, I just tried your attached file. I had no idea that relationships could be set up that way. I'd seen passing reference to the multi-key approach, but didn't really know what it was. This opens up a ton of possibilities for finding, displaying info, etc. Especially if text files can be imported into global fields to produce the lists. I'm blown away.

Thanks!

Dan

Posted

Yeah, isn't FMP cool! Sure it's got its limitations, but it's still cool.

Posted

Dan ...

Yeah, it's pretty cool. I have Ugo to thank for introducing me to some of the many uses of the multi-key relationship when he and I were experimenting last summer with finding Parent records based on multiple criteria in Child records.

One thing I didn't know how to do for this demo is how to keep the list in g_multiSICfind sorted by SIC code as the user adds/removes codes while constructing the key. I thought this would be a cool feature so the user could quickly check if a code is present in the field or not. I'd definitely like to see how this would be done.

Instead, I used the + and - symbols and the highlighted background in the selection list as an visual aid in spotting included codes, which, I dunno, might be just as effective, except for having to scroll the list.

I always learn something by doing up demos like this for users' questions. Which is why the Forums and the Cafe are such gr8 places to hang. smile.gif

Posted

Great file Jim.

I can see we have that same approach of what Forums can get to both the one who asked and the one who answered.

And I got this Multikey "addiction" from Dj... wink.gif

  • 2 weeks later...
  • Newbies
Posted

Is it possible to copy the contents of the found data to a diffent field?

I am struggling with a field that contains text, but I need to get a part of that text and insert said into a different field, and eventually use the new field as an indexed field.

Posted

Is there anything special about the "Part" of the text you want to copy, that sets it apart from the rest of the text in the fields.

Is it always in the same place (i.e. the first word or 2 or 9 or 10 in the field.)

Is there a pattern to the text such as always having a Certain Word to set it apart (i.e. Subject:)

As you can see, you need to give us some information, or an example the text in order for us to help.

Try to analyze the field information and see if there is a common denominator. Look for things such as the position of the text, common field designators such as ":", ",", "|", etc., look for Key Words such as Subject, Title, etc.

HTH

Lee

This topic is 7637 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
×
×
  • Create New...

Important Information

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