cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CYT_Dev
Helper I
Helper I

Patch Error : invocation of unknown or unsupported function

Hi,

I am trying to patch back a new available qty, when an item from a collection is removed.

The collection is a  shopping basket created from a sharepoint list called 'Staff Shop List'

The basket is visible to the user and they can delete items from it

I then want to return the qty back to 'available' stock.

The two Material fields are the same format

I am using this formula

Patch('Staff Shop List',Lookup( 'Staff Shop List', Material = MaterialBought), { Available: Available + ThisItem.Qty })

 I get the error

"invocation of unknown or unsupported function"

 

Am i missing something from the formula, or is it the wrong way to udpate the available back?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Nogueira1306
Super User
Super User

Hey! Patch Function is wrong 😕 

 

ForAll(
    Filter(
        'Staff Shop List';
        Material = MaterialBought
    );
    Patch(
        'Staff Shop List';
        Defaults('Staff Shop List');
        {
            Available: Available + ThisItem.Qty
        }
    )
);;

View solution in original post

1 REPLY 1
Nogueira1306
Super User
Super User

Hey! Patch Function is wrong 😕 

 

ForAll(
    Filter(
        'Staff Shop List';
        Material = MaterialBought
    );
    Patch(
        'Staff Shop List';
        Defaults('Staff Shop List');
        {
            Available: Available + ThisItem.Qty
        }
    )
);;

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,829)