chuckcou Posted March 24, 2013 Posted March 24, 2013 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. Chuck ZipCodes&Search.zip
bruceR Posted March 24, 2013 Posted March 24, 2013 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 1
chuckcou Posted March 24, 2013 Author Posted March 24, 2013 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.
chuckcou Posted March 24, 2013 Author Posted March 24, 2013 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??
chuckcou Posted March 24, 2013 Author Posted March 24, 2013 I think I got it. I see you did a script. Interesting. That pretty cool.
carlosnorvik Posted June 5, 2013 Posted June 5, 2013 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
bruceR Posted June 5, 2013 Posted June 5, 2013 It can be done but you'll have to figure it out or search the forums for a solution.
Newbies lisaF Posted July 7, 2013 Newbies Posted July 7, 2013 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??
doughemi Posted July 7, 2013 Posted July 7, 2013 Go to Related Records is a script step. See http://www.filemaker.com/12help/html/scripts_ref1.36.20.html
Newbies lisaF Posted July 7, 2013 Newbies Posted July 7, 2013 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"
Recommended Posts
This topic is 4158 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