cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver III
Resolver III

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

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
Super User III
Super User III

@iwonder ,

Can you please supply your formula as text.

Super User
Super User

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

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!

Hi PaulD1

 

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

 

Thanks

I found "Monitor"

 

iwonder_0-1605635553740.png

 

Is this helpful?

 

Thanks

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,

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (107,270)