Collection of strings
(Created page with "To create a collection of strings in a OCL or EAL expression, use OCLOperators Sequence or OCLOperators Set. You can have the declaration based on a expression, like...")
 
No edit summary
Line 8: Line 8:
  }->asCommaList
  }->asCommaList
The example above will create a comma separated list of strings with a dynamic length/size depending on the expressions.
The example above will create a comma separated list of strings with a dynamic length/size depending on the expressions.
[[Category:OCL]]
[[Category:EAL]]

Revision as of 08:19, 2 December 2022

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

You can have the declaration based on a 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 98 days ago on 02/10/2024. What links here