Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Update blank Column in collection

(0) ShareShare
ReportReport
Posted on by 178

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

 

image.png

  • christian12 Profile Picture
    christian12 178 on at
    Re: Update blank Column in collection

    Thank you very much. This works 🙂

  • Verified answer
    Re: Update blank Column in collection

    Hi @christian12 ,

     

    Please try this

    vxiaochenmsft_0-1696469270890.png

    ClearCollect(Col,{PREVIOUS_READING:"",READ:9234},{PREVIOUS_READING:"",READ:9158},{PREVIOUS_READING:"",READ:8975},{PREVIOUS_READING:"",READ:8558})

    vxiaochenmsft_1-1696469285481.png

    ForAll(Sequence(CountRows(Col)),If(Value<>CountRows(Col),Patch(Col,Index(Col,Value),{PREVIOUS_READING:Index(Col,Value+1).READ})))

    vxiaochenmsft_2-1696469304065.png

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard