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

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

Recommended Posts

Posted

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.

Posted

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 &

Posted

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

Posted

LOL

I forgot about that new feature in v7.

How does it go now? Lets see, Get(ETC, 1, 2)

yay.gifyay.gifyay.gif

cha, cha, cha

Lee

cool.gif

Posted

Thanks to both of you.

But I cannot get the script to work. fMP doesn't seem to like the syntax. is it a different version thing?

I'm asuming each set field is on its own line in the script?

Posted

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.

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