cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iwonder
Continued Contributor
Continued Contributor

Patch Gallery

Thank you for taking the time to read my question.

 

I am trying to loop through all the filtered results of my Gallery and patching the ones that have the checkbox checked.

 

This is my formula. When I type it in, it's fine but when I run it the Lookup() part gets the red underline.

 

iwonder_0-1605567521274.png

 

Also, the Patch doesn't happen and the record is not updated.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
iwonder
Continued Contributor
Continued Contributor

I figured it out. I used RenameColumns() on the Gallery.

 

ForAll(
    RenameColumns(NewHistoricalPelleting.AllItems,"ID","RecID"),
    If(
        ThisRecord.chkUpdate.Value = true,
        Patch(
            PelletingRecord,
            LookUp(
                PelletingRecord,
                ID = RecID
            ),
            {
                QAReviewedDate: Now(),
                QAReviewedBy: User().Email,
                QAComments: QAComments.Text
            }
        )
    )
);
Notify(
    "All Done",
    NotificationType.Information
)

 

Thank you for your responses to my question.

View solution in original post

7 REPLIES 7
WarrenBelz
Super User III
Super User III

@iwonder ,

Can you please supply your formula as text.

PaulD1
Super User
Super User

Could you try turning on Performance Monitor and seeing if that gives any more detail about the error?

iwonder
Continued Contributor
Continued Contributor

Hi WarrenBelz,

 

Thank you for your reply.

 

Here is the formula as text:

ForAll(NewHistoricalPelleting.AllItems, If(ThisRecord.chkUpdate.Value = true, Patch(PelletingRecord,LookUp(PelletingRecord,ID = ThisRecord.ID ),{QAReviewedDate:Now(),QAReviewedBy:User().Email,QAComments:QAComments})));Notify("All Done",NotificationType.Information)

 

Thanks!

iwonder
Continued Contributor
Continued Contributor

Hi PaulD1

 

I am in Advanced Settings and I do not see Performance Monitor. Is there somewhere else I should be looking?

 

Thanks

iwonder
Continued Contributor
Continued Contributor

I found "Monitor"

 

iwonder_0-1605635553740.png

 

Is this helpful?

 

Thanks

iwonder
Continued Contributor
Continued Contributor

One thought.

Do I need to use RenameColumns()? The name of the columns are the same... they're both "ID". One "ID" is ThisRecord and the other is from PelletingRecord in SharePoint.

 

Thanks,

iwonder
Continued Contributor
Continued Contributor

I figured it out. I used RenameColumns() on the Gallery.

 

ForAll(
    RenameColumns(NewHistoricalPelleting.AllItems,"ID","RecID"),
    If(
        ThisRecord.chkUpdate.Value = true,
        Patch(
            PelletingRecord,
            LookUp(
                PelletingRecord,
                ID = RecID
            ),
            {
                QAReviewedDate: Now(),
                QAReviewedBy: User().Email,
                QAComments: QAComments.Text
            }
        )
    )
);
Notify(
    "All Done",
    NotificationType.Information
)

 

Thank you for your responses to my question.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,327)