Hi Team,
I need to update a column within my collection with the next rows value.
Example 1st row need to update with 2nd rows values. 2nd row need to update with 3rd rows value and so on. Once we run out of rows the last row will not have a value as the next row wont be available.
I have tried a few ways although can't seem to get it working.
Any help is greatly appreciated.
Thanks
Thank you very much. This works 🙂
Hi @christian12 ,
Please try this
ClearCollect(Col,{PREVIOUS_READING:"",READ:9234},{PREVIOUS_READING:"",READ:9158},{PREVIOUS_READING:"",READ:8975},{PREVIOUS_READING:"",READ:8558})
ForAll(Sequence(CountRows(Col)),If(Value<>CountRows(Col),Patch(Col,Index(Col,Value),{PREVIOUS_READING:Index(Col,Value+1).READ})))
Best Regards,
Wearsky