Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Patching Update to two Sharepoint tables for all selected Items in a gallery

(1) ShareShare
ReportReport
Posted on by 122
Hi 
 
I have a gallery (glyupload_3) which is a collection bringing two sharepoint list together. I am trying to patch back to both sharepoint lists the Uploaded Date (todays date) for all the selected lines in the gallery. The below formula only patched back the first line from the gallery to the sharepoint lists which i am aware is because it is referencing the first line in the gallery. How do i get it to loop through all the lines in the gallery which have been selected? 
 
ForAll(
    Filter(
        glyupload_3.AllItems,
        Checkbox3_1.Value
    ) As DATA,
    Patch(
        'Requisition Main',
        LookUp(
            'Requisition Main',
            'Order Number' = Label68_143.Text
        ),
        {'Uploaded Date': DatePicker1_3.SelectedDate}
    )
);
ForAll(
    Filter(
        glyupload_3.AllItems,
        Checkbox3_1.Value
    ) As DATA,
    Patch(
        'Requisition Line Item',
        LookUp(
            'Requisition Line Item',
            'Item Number' = Label68_144.Text
        ),
        {'Uploaded Date': DatePicker1_3.SelectedDate}
    )
)
 
Many thanks
 
Chris 
  • Verified answer
    DJ_Jamba Profile Picture
    2,822 Super User 2025 Season 1 on at
    Patching Update to two Sharepoint tables for all selected Items in a gallery
    Assuming the two labels (Label68_143, Label68_144) are in the gallery and not sure if the date picker (DatePicker1_3) is in the gallery but will say yes for now, you simply need to prefix those controls in your patch with DATA, so something like this:
     
    ForAll(
        Filter(
            glyupload_3.AllItems,
            Checkbox3_1.Value
        ) As DATA,
        With(
            {
                L143: Trim(DATA.Label68_143.Text),
                L144: Trim(DATA.Label68_144.Text)
            },
            Concurrent(
                Patch(
                    'Requisition Main',
                    LookUp(
                        'Requisition Main',
                        'Order Number' = L143
                    ),
                    {'Uploaded Date': DATA.DatePicker1_3.SelectedDate}
                ),
                Patch(
                    'Requisition Line Item',
                    LookUp(
                        'Requisition Line Item',
                        'Item Number' = L144
                    ),
                    {'Uploaded Date': DATA.DatePicker1_3.SelectedDate}
                )
            )
        )
    )

    Or, if the date picker is not in the gallery:
     
    ForAll(
        Filter(
            glyupload_3.AllItems,
            Checkbox3_1.Value
        ) As DATA,
        With(
            {
                L143: Trim(DATA.Label68_143.Text),
                L144: Trim(DATA.Label68_144.Text)
            },
            Concurrent(
                Patch(
                    'Requisition Main',
                    LookUp(
                        'Requisition Main',
                        'Order Number' = L143
                    ),
                    {'Uploaded Date': DatePicker1_3.SelectedDate}
                ),
                Patch(
                    'Requisition Line Item',
                    LookUp(
                        'Requisition Line Item',
                        'Item Number' = L144
                    ),
                    {'Uploaded Date': DatePicker1_3.SelectedDate}
                )
            )
        )
    )


     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1