Jump to content

Parse data from a field into separate records


EllenG
 Share

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

Recommended Posts

I'm looking for a way to parse out data from one field into single records. The current field lists values with a carriage return par.gif. So, for instance, the field "date" may have 5 lines:

1/10/04

2/1/04

3/1/04

4/15/04

5/20/04

I want to parse out each line into a separate record, so that my "new date field" will have 1 date only in the field. If there are 5 dates listed, I would end up with 5 records.

The number of line entries in the field varies by record. Animal record 1 may have 3 lines of dates, animal 2 may have 5 lines, etc.

I think I came across a formula for doing this, but I can't find it now. Can someone please point me in the right direction??

Thanks.

Version: Developer v6

Platform: Windows XP

Link to comment
Share on other sites

Idea for FM6 script: use PatternCount to get the number of paragraph markers (carriage returns). Then parse the field in a loop using position to find the apropos returns and middle to get the value between them, creating a new record for each value past the first. Set the original record's field to the first line's value.

It's late & I've been FileMakering all day, so if this doesn't make sense reply & I'll write a quick example tomorrow.

Link to comment
Share on other sites

Hi,

Here's one way of handling the job, which wouldn't work with 7 due to the now known bug about repetitions.

There are a few steps for matter of detail, but by joining all these steps in one, it could become real quick.

Also, you'd use ValueListItems in script rather than plain unstored calc.

This method allows to

Sort your list of dates

Check if dates were already inputted into the related file (that could be the same file also)

Import the residual set into new records, using repeating fields.

HTH

FileMaker Version: v6.x

Platform: Mac OS 9

ParseImport.zip

Link to comment
Share on other sites

This topic is 6506 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.