Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
anyone that can share a code snippet to create a field from variable list (Note, the variable contain several values).
Example, the following list should be transformed to a field with 3 rows:
VariableList: '202001', '202002', '202003';
Thanks in advance,
br
Paul
Found it myself, script function subfield magically creates several rows:
set vGO = '201902','201903','202004';
let CountYearMonths = num(SubStringCount('$(vGO)', ','))+1;
NrOfMonths:
Load
mid(YearMonth, 2,6) as YearMonth;
Load
subfield('$(vGO)', ',') as YearMonth
autogenerate(1);
Found it myself, script function subfield magically creates several rows:
set vGO = '201902','201903','202004';
let CountYearMonths = num(SubStringCount('$(vGO)', ','))+1;
NrOfMonths:
Load
mid(YearMonth, 2,6) as YearMonth;
Load
subfield('$(vGO)', ',') as YearMonth
autogenerate(1);