Hello Everyone!
Good day!
I want to increment inside ForAll. My expected output is to get value of ID: 2 AND 4. because the counter value is 2.
How to correct this? Thanks in advance
Clear(newCollection);
Clear(Counter);
Set(varID, 0);
Set(varCounter, 2);
Set(varCounter2, 1);
ClearCollect(
colTestItems,
{ID: 1, Value: "13.54"},
{ID: 2, Value: "15.54"},
{ID: 3, Value: "14.54"},
{ID: 4, Value: "16.54"},
{ID: 5, Value: "18.54"},
{ID: 6, Value: "12.54"}
);
ForAll(
FirstN(colTestItems, 2),
Collect(Counter, 2);
Collect(newCollection, {Value: LookUp(colTestItems, ID=varID+CountRows(Counter)).Value });
)