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

Why does my patch not work but the other simplistic add columns method does work?

I am building a basic app and I want to join the vendor name (comes from Test-Vendors.Title column) with the Test-Reviews list...

This works...

ClearCollect(Reviews,
    AddColumns('Test-Reviews',
        "VendorName",LookUp('Test-Vendors',ID=VendorID,Title)
    )
)

But as is often the case, I know eventually I'll be adding complexity to it. So I go with the more advanced ForAll, With, Patch method. It barks at everything...can you see any typo here?

ClearCollect(Reviews,
    ForAll('Test-Reviews' as _r,
        With(
            {
                _vName: LookUp('Test-Vendors',ID=_r.VendorID)
            },
            Patch(
                _r,
                {
                    VendorName: _vName.Title
                }
            )
        )
    )
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@sasrsc1966 

Yes, you have a typo in the formula.  The As operator is capital A then s...not all lower case.

 

ClearCollect(Reviews,
    ForAll('Test-Reviews' As _r,
        With(
            {
                _vName: LookUp('Test-Vendors',ID=_r.VendorID)
            },
            Patch(
                _r,
                {
                    VendorName: _vName.Title
                }
            )
        )
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@sasrsc1966 

Yes, you have a typo in the formula.  The As operator is capital A then s...not all lower case.

 

ClearCollect(Reviews,
    ForAll('Test-Reviews' As _r,
        With(
            {
                _vName: LookUp('Test-Vendors',ID=_r.VendorID)
            },
            Patch(
                _r,
                {
                    VendorName: _vName.Title
                }
            )
        )
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Once again, the obvious eludes me... duh!

RandyHayes
Super User
Super User

@sasrsc1966 

😂 It happens sometimes!!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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