Hi,
I want to replicate several arrays with the apply() function any idea how to do it with a rule.
I am using now this expression rule:
= load( /* ri!data is List of Text String, ri!fieldCount is Integer */ local!count: count(ri!data)/ri!fieldCount, apply( type!ParseTest(_,_,_), merge( index(ri!data, 1+ri!fieldCount*enumerate(local!count), null), index(ri!data, 2+ri!fieldCount*enumerate(local!count), null), index(ri!data, 3+ri!fieldCount*enumerate(local!count), null)) ))
And i want to replicate the part: index(ri!data, 1+ri!fieldCount*enumerate(local!count), null)
I tried this:
= load( /* ri!data is List of Text String, ri!fieldCount is Integer */ local!count: count(ri!data)/ri!fieldCount, local!numListFields: 1+enumerate(ri!fieldCount), apply( 'type!{urn:com:appian:types}ParseTest'(_,_,_), apply(rule!arraysForCDTPopulate(ri!data,ri!fieldCount,local!count,_),local!numListFields) ))
Where the rule!arraysForCDTPopulate(ri!data,ri!fieldCount,ri!count,ri!numListFields) is like this:
index(ri!data, ri!numListFields+ri!fieldCount*enumerate(ri!count),null)
But this is retrieving the that all in 1 array and i need the data separated in 3 arrays so the 'type!{urn:com:appian:types}ParseTest'(_,_,_) works.
Any suggestion?
Thnaks
Discussion posts and replies are publicly visible