I have a problem with a Computed For Display field, which contains a DBColumn. This field holds the following value : “News!!; More news!!” which is the concatenation of two rows of data, separated by a semi-colon.
I have some Computed Text which does an @Left on the above field, but all it ever picks up is a comma??
@Left works on list so if the formula is returning a comma then it sounds like the source field is a multivalue field (2 values) and nothing is returned from the @left command resulting in two empty values.
My source field is a multi-value field, because i’m capturing the contents of a view column. It’s @Text(@DBColumn(view etc…).
I’m then trying to separate the values from the multi-value field, starting with @Left.
I want to parse out each value of my multi-value field into pieces of Computed Text.
The idea is that the DBColumn gets a list of news items for a Javscript news ticker, then each bit of Computed Text, which is pass-thru HTML for the ticker, picks up each element of the multi-value field.
My problem now is, I have a list of values in my CFD field, but i’m not sure how to separate them to add individually to pieces of Computed Text, like the one above. The one above of course only works for the first element, but how do I now get at the rest of the elements of my list?
You might look at using @Word if you know the position in the list of each value that you want to extract. Syntax is @Word( string ; separator ; number ).
For example, @Word(list; “;”; 3) will return the third value in a list separated by semicolons.