Collection of strings

To create a collection of strings in an OCL or EAL expression, use OCLOperators Sequence or OCLOperators Set.

You can have the declaration based on an expression, like this:

Sequence{
  self.ValidMaterials->notEmpty.caseTrueFalse('Materials', String.nullValue),
  self.ValidColors->notEmpty.caseTrueFalse('Colors', String.nullValue),
  self.ValidFinish->notEmpty.caseTrueFalse('Finish', String.nullValue)
}->asCommaList

The example above will create a comma-separated list of strings with a dynamic length/size depending on the expressions.

This page was edited 75 days ago on 02/10/2024. What links here