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