Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Asset Checkout not updating in 2nd SharePoint list

I'm trying to build an app that will track books. I want to track who is checking out which book and when they checked it back in. I'm using the Asset Checkout template as a guide and I have 2 SharePoint lists as my data sources: Inventory and UserCheckout.


What I want to happen is, when someone checks out a book, let's call it Alphabet for Dummies, I want the CountValue column to reduce by 1 (# available) in the Inventory list and I want to add a record in the UserCheckout list with the person's Name, ReservedUntil (Due Date), (Book) Title, and Email.


I've managed to get the flow working in the sense that all the buttons work with no errors and I have the 'CountValue' in Inventory reducing when I go through with the process of checking out a book. Where I'm having an issue is that a record isn't being added to the UserCheckout list. I tried patching the lists so that when I hit Submit, it would update both lists but I keep getting an error.


This is what I already have:



And this is how I've tried patching: 

Patch(UserCheckout, Defaults(UserCheckout), {ReservedByEmail=DataCard3})




Community Support
Community Support

Hi @zebraffe_x,


The patch() furmula in your second formula will not work.

Patch(UserCheckout, Defaults(UserCheckout), {ReservedByEmail=DataCard3})

    {NewRecord:  Patch(Inventory,First(Filter(Inventory,Title=checkedout.Title)),




The correct format should be:

Patch(UserCheckout, Defaults(UserCheckout), 
Person's NameField:PersonName})

For how to use patch, see:

Patch() in PowerApps


Let me know if that would work.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-micsh-msft,


Thanks for reaching out. I tried your solution but I'm still getting an error. This is all the code that I have in the OnSelect button, which should submit the form and update/populate both lists:

UpdateContext( {NewRecord:Patch(Inventory,First(Filter(Inventory,Title=checkedout.Title)), {CountValue:If(checkedout.CountValue>0,checkedout.CountValue-1,checkedout.CountValue)})});
Patch(UserCheckout, Defaults(UserCheckout), {ReservedByName:DataCard2.Text});

I highlighted in red where the error is that I'm getting. I also tried using DataCardValue#.Text and I even tried taking out the .Text but I'm still getting an error. The error I'm getting when I hover over .Text is Invalid name


I've read through that Patch() article but I'm still a little confused as to how to get it working how I need it to, hence how I ended up with my original code.

I tried your solution but I'm getting an error (in previous reply). Do you have any suggestions on what I can do or why it's not working?

Helpful resources


Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

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

New Power Super Users


We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (38,853)