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.

zipcodes--Finding multiple value from a text file

Featured Replies

Source:  I have a database of zip codes.  

Trying to Achieve   I will have at text file of 12 zip codes that need to be found.

Current Method:   I click on find, enter one zip code, do a cntl-n, enter another zip code, cntrl-n, enter another zipcode... until done.

Problem:  This works but can be very time consuming.

Today I had enough:  Today, I had 35 zip code.  20 minutes later, I decided there has to be a faster way.

Not sure where to start:  I have been thinking about this, but not sure how to begin.  Do I do a script, relationship, global, etc.

Data:  I have attached the Filemaker data and my text file of search data for reference.{see zip file--zipData.fp7 and samplesearch.txt}

 

 

Help:  I am hoping someone can get me started.  My search data is in a simple text file with a return separating each zip(thus each zip is on its own line).  Of course,  the filemaker pro is holding 100's of zip codes.

 

I would appreciate if someone can at least get me started.  One way I can think is to do a script with a loop, but how do I pick up the data from the text file?   My guess is there is probably a much better way.

 

Thanks in advance for any suggestion or help you can give. :grad:   Chuck 

 

 

ZipCodes&Search.zip

There are lots of ways to do this, here is one approach.

 

Create another table, ZipMatch

Create a relation from this table to your original table.

Import the text data into the Zipmatch table, then go to related records.

 

The attached file shows this approach.

Scripting is very basic, no error detection, and it requires the search file to be given the same name, and be in the same folder as your FileMaker file.

 

What's the bigger picture on what you're doing here? 

Is the FileMaker file local or served?

Is the search file always named the same?

 

ZipCodes&Search.zip

  • Author

Bruce R--Looking over what you did.  But to answer your questions--

 

What's the bigger picture on what you're doing here? Once I do the find, I export those items into an excel file.

Is the FileMaker file local or served?  Local

Is the search file always named the same?  It can be.  I name it when I create it.  So it can be named pretty much anything.  I can also make it csv or tab.  I just figure the return would be the easiest.

  • Author

This can work, but this is going to sound like a stupid question

 

Create another table, ZipMatch  {UNDERSTAND}

Create a relation from this table to your original table.{UNDERSTAND}

Import the text data into the Zipmatch table, {UNDERSTAND}

then go to related records.  How would I do this?? :grad:

  • Author

I think I got it.  I see you did a script.  Interesting.  That pretty cool. 

  • 2 months later...

Hi BruceR

I tried it on a different setting, works very nice, thanks.

 

However I have tried to find a way to be able to paste data, for example if somebody sends me a list of items in Excel , directly into the Filemaker table, that way I avoid the import part of the script, but they all get pasted onto a single record.

Is there any way to paste so that each Excel cell /text line are pasted as a different record?

 

My temporary solution (until I find out how to paste directly into FM)  has been to paste it into an old database program (which pastes every Excel cell/text line  as a different record, and have the script import from the dbf format.

The reason for this, is that it allows instant paste of data from Excel, Open Office, text, etc.

Then on the old database I have a button that erases all records and leaves it ready for the next job.

 

Thans and regards

Carlos

It can be done but you'll have to figure it out or search the forums for a solution. 

  • 1 month later...
  • Newbies

Please forgive me but I am an EXTREMELY new user and I am trying to understand everything. I have figured out how to do everything below except "Go to the related records." How do you do this?

 

Create another table, ZipMatch  {UNDERSTAND}

Create a relation from this table to your original table.{UNDERSTAND}

Import the text data into the Zipmatch table, {UNDERSTAND}

then go to related records.  How would I do this??  :grad:

  • Newbies

Nevermind. I figured it out...well I am not sure if it is the correct way, but it works for what I needed.


Thanks for trying to help. I just saw your post after I posted "Nevermind"   :laugh:

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.