Jump to content

separating items

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

Recommended Posts

someone gave me a DB that had a list of furniture items. Trouble is they are all in one field and separated by "returns".

Any nifty ways to separate them into separate records? so can bring them back in as a portal.


Link to comment
Share on other sites


Exit Loop If [ IsEmpty(gList) ]

New Record / Request

SetField [ ItemName, Left(gList, Position(gList, "P", 1, 1)-1) ]

# any other field settings in the new furniture item record

SetField [ gList, Right(gList, Length(gList) - Position(gList, "P", 1, 1)) ]

End Loop

where "P" is the paragraph symbol in quotes.

Link to comment
Share on other sites

The principle behind the solution Brian has suggested will work fine if you have a single set of entries in a global field.

If, as I suspect may be the case, you have a group of entries in a text field on each record, then you are going to need a slightly more complex solution which passes through all the records, expanding each in turn, until all the values from all the records have been separated.

The principle is essentially that of expanding data arrays, since the text you are dealing with is actually an array (albeit separated by a carriage return rather than the various other delimiters sometimes used).

I suggest that to do this, you might be interested to take a look at an 'Array Expander' example file which I've posted to my web site. The URL to download it from is:


It is a free unlocked demo, which illustrates a scripting approach to the expansion of arrays. The example in the file uses numeric data which is pipe delimited, but exactly the same principle can be used to 'expand' text arrays which are 'CR delimited', so you will readily be able to adapt it to your purposes if you wish.

Link to comment
Share on other sites

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