Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FMP 5.0 Exporting Data with a Carriage Return 1

Status
Not open for further replies.

sdski

IS-IT--Management
Oct 11, 2002
2
US
I have inherited a FMP database with two large text fields. On every line of field one is an inventory item. One every line of field two is the price.
I need to get a list of the items and prices.
I am trying to export, then parse in Excel.
I end up with two large fields. In field one, the items are separated by a square box, carriage return ascii #141.
Same in field two.
Excel or Access won't parce on the carriage return.
Any help with the export or import would be greatly appreciated.
 
I take it there are multple records with these huge fields?
You'd be much better off parsing in FMP. Define a new field for the combination of Item and Price. (They could be separate fields.)
Then write a script that extracts the various single values using -
Leftwords(RightWords(BigField, Counter), 1)
where Counter starts out as WordCount(BigField) and gets decremented on each single value fixed.
Depending on just how big the lists are and how often you need to do this, you could - define lots of pairs of new fields in each current record
use repeating fields in the current records
create a new record for each pair of values - preferrably in a separate file.

I know this is a bit vague but the script is going to be quite complicated and the treatment depends heavily on the qualifiers I've mentioned above.
email me if you need more.
sheaven@zip.com.au






Cheers,
Paul J.
 
Good idea.
The "item" field is actually a large text field.
The user only entered one "item" on each "line" of the field, then went to the next line for the next "item" etc.
Could I test for end of line? or a carriage return, then I will know I have an item?

Thanks for the help
 
Yep.
Simply check for a paragraph marker. This is one of the special characters listed in the middle table in the 'define calculation' window.
Cheers. Cheers,
Paul J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top