Jump to content
Server Maintenance This Week. ×

simple(?) importing into FMP7


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

Recommended Posts

ok, please no eye-rolling:

lets say I have plain text that looks something like this:

Contact Information

-------------------------

Name: BOBBY BOBSMAN

Address: 200 ANY STREET

City: SHOOTEM State: TX Zip: 75147

Hm. Phone: (555)555-5555 Wk. Phone: (555)555-5555 Ext.:555

Email: BOBBY(at)BOBHEAD.COM

Married?: No Age:42

Shoe Size: AM

More Information

---------------------

DOB: 03/15/1962

Gender: M

Height: 5ft 3in Weight: 579

How can I import this into FMP7 ? Do I have to specify what is to the left of the first colon somehow?

(on my wishlist: automate these if they were emailed to me)

which reminds me, does anyone out there have xml flying into a database automatically from the web? That is my next frontier.

Link to comment
Share on other sites

You import it into a single temporary field and then parse out the individual data into your fields using the position of the field name, colon, and whatever bounds the end of the specific text as your guides.

Set Field [Name; Let( P = Position( Textfield; "Name: "; 0; 1 ); Middle( Textfield; P + 6; Position( Textfield &

Link to comment
Share on other sites

Hi JT,

You forgot the Phone numbers in your calculation.

Hi JD,

JT has given you a approach using FileMaker. However, since it is already a text document, I would just modify the file in a text editor like BBEdit or TextWrangler, and then import the result. Both have powerful Find and Replaces, including the ability to use Grep Patterns and Regular Expressions to really manipulate a file to meet your needs.

No matter which way you choose, you will want to ensure that every record has the same fields (even if they are blank), or you will need to account for them in your import or the calculation.

Lee

Link to comment
Share on other sites

Set Field [field; calculation] means that you select 'field' after clicking the Field button, and enter the calculation after you click the Specify button. When you've finished, it will look like Set Field [field; calculation] in the script. The brackets are not entered; they merely delimit the parameters of the step.

And yes, each Set Field is a different step.

Link to comment
Share on other sites

This topic is 7127 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.