Kirix Support Forums

Multiple data columns within a single HTML table column

Please post any help questions, requests or other feedback here.

Multiple data columns within a single HTML table column

Postby sathomasga on Wed Aug 08, 2007 12:37 pm

I've run across an HTML table in which one of the columns contains a list of space-separated numbers. I'd like to split that column into multiple kirix columns, one for each number. Must I be resigned to digging into the scripting, or is there an easy way?

(Actually, I wouldn't dig into the scripting. I'd copy the column to Word and have Word convert to tables. Seems like a waste, though.)

Stephen
sathomasga
Registered User
 
Posts: 2
Joined: Wed Aug 08, 2007 12:33 pm

Re: Multiple data columns within a single HTML table column

Postby Aaron on Wed Aug 08, 2007 1:04 pm

There's an easy way to do it using calculated fields and the STRPART() function.

In your table, right-click on a column label and select "Create Calculated Field" from the menu. In the calculated field, enter the formula:

STRPART(<field>, <index>)

where <field> is the field containing the list of numbers and <index> is the index of the element in the list of numbers you wish to extract. So, if your field is called NUMBER_LIST and you wish to get the second value, use the formula:

STRPART(NUMBER_LIST, 2)

Note: STRPART() works with other types of delimited text and lets you specify a delimiter as an optional third parameter. So, in the previous example, if the list were delimited by semicolons, you would use:

STRPART(NUMBER_LIST, 2, ";")
Aaron Williams
Kirix Support Team
User avatar
Aaron
Kirix Support Team
 
Posts: 120
Joined: Fri Dec 16, 2005 3:01 pm

Return to Strata Help & Feedback