Columns in View needs to display more than one field

I have a database that allows the user to enter information for up to 10 reactors per location. So I have a series of fields with the same name but with a number added to the name like reactor1,…reactor10 and mat1…mat10. They want me to display some of these fields in a view. I know I can do something like this:

@If(reactor1 = “”; “”; t := reactor1 : t);

(repeat for 9 more fields)

@If(@Elements(t) = 0; “”; @Subset(t; @Elements(t)-1))

for the reactor column. But what if I need to have several other columns just like this in the same view. Is there any way to insure that the mat that displays in the next column is the one that goes with reactor1 and not one of the other nine?

You should end up with

reactor1 mat1 something1

reactor2 mat2 something2

Also, there’s no garantee that all the fields will have values.

The only thing I can think of that will work for sure make a string out of all the values and then display them in like

one := reactor1 : mat1 : something1

two := reactor2 : mat2 : something2

myList := one : two

myList

Subject: Use @while to create your strings

Use this formula in a multivalue computed field on the doc and then just display it in a column of the view:

index:=1;

result:=“”;

@while(index<=10;

rval:=@getfield(“Reactor”+@text(index));

mval:=@getfield(“Mat”+@text(row));

sval:=@getfield(“Something”+@text(row));

string:=@trim(rval + " " + mval + " " + sval);

result:=@if(string=“”;result;result:string);

index:=index + 1);

result

Subject: Columns in View needs to display more than one field

Why not just concatinate the two fields into a single field ie Reactor1 & Mat1 etc then check for a “” length and do the rest of your formulation based on the some format of the two fields. This would work so long as you do not need to sort the two columns independantly.

Subject: Columns in View needs to display more than one field

Can you show the sample of view of one document what you want to get ?