October 21, 200421 yr 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.
October 21, 200421 yr 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 &
October 21, 200421 yr 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
October 21, 200421 yr LOL I forgot about that new feature in v7. How does it go now? Lets see, Get(ETC, 1, 2) cha, cha, cha Lee
October 22, 200421 yr Author 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?
October 22, 200421 yr 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.
Create an account or sign in to comment