web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

manitpulate tabel

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
 
Hello
I'm trying to transfer data from one table to another

how i do this is as follows

i use this

Patch (lending beamer; Defaults (lending beamer); {product: product_beamer}; {'nmbs code': nmbcode_beamer}; {brand: brand_beamer}; {size: size_beamer})

this is to transfer the data from beamer to loaned beamer
the remove works
:
Remove (beamer;
First (Filter (beamer; DataCardKey_nmbcode_beamer = DataCardValue_nmbcode_beamer)))

when i patch i get this error
: The patch function has some invalid arguments

screen shot below for clarification


 
this is my code on the button that activates it

Knipsel.PNG

this is the table beamer


Knipsel.PNG
 
this is the table loan projector
here the data from beamer should come with the pacth function


Knipsel.PNG

 
this is the document where the tables are located


Knipsel.PNG


Categories:
  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    Firstly, I would suggest you separate your Patch code onto a button to get it working before putting it back at the end of the email.

    However your problem is that you are not telling the Patch where to get the fields from (Beamer table) and then you need to tell it which record in the table to copy the values from.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    like this

    :

    Patch (beamer; Defaults (lending beamer); {product: product_beamer}; {'nmbs code': nmbcode_beamer}; {brand: brand_beamer}; {size: size_beamer})

     

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    For new records - yes. I was not sure from your post whether you were doing this or updating existing records.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    i don this :

    Patch( beamer; Defaults( uitleenbeamer); {product: product_beamer}; {'nmbs code': nmbscode_beamer}; {merk:merk_beamer}; {groote: groote_beamer})

     

    but it still gives an errot it says : the patch function has some invalid arguments

    and beamer is tabel that exists and uitleenbeamer is a table that also exists  i just want to put data into uitleenbeamer .

     

    this gets its data from a textbox

    {product: product_beamer}

     



  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz 

     

    i found the problem the patch dos work whit string

     

    but i pas variables whit it like this

     

     

    Set(product_beamer;ThisItem.'product ');;Set(nmbscode_beamer;ThisItem.'nmbs code');;Set(merk_beamer;ThisItem.merk);;Set(groote_beamer;ThisItem.groote)

     

     

     

     

    this is where i give it 

    Knipsel.PNG

     

    so how can i fix this that this is a string

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    I did not read your Patch code properly. The defaults are where you are patching and you need to loop through the other list.

    The one below patches new records to the List beamer for all records in the Collection uitleenbeamer.

    ForAll(
     uitleenbeamer;
     Patch(
     beamer; 
     Defaults(beamer); 
     {
     product: product_beamer;
     'nmbs code': nmbscode_beamer;
     merk:merk_beamer;
     groote: groote_beamer;
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz 

    look at the picture above

    i give the value into a var the i use this var to patch it into my table

    it works whit string but not whit var wy is that and how can i fix this ?

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    There is no picture on your post - did you try the code I sent?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz 

     

    yes but it give a error

    the error is when i put the var i set them like this :

    Set(product_beamer;ThisItem.'product ');;Set(nmbscode_beamer;ThisItem.'nmbs code');;Set(merk_beamer;ThisItem.merk);;Set(groote_beamer;ThisItem.groote)

     

    then, in my patch i put this :

    Patch( beamer; Defaults( uitleenbeamer); {product: product_beamer}; {'nmbs code': nmbscode_beamer}; {merk:merk_beamer}; {groote: groote_beamer})

     

     

    but the problems are :product_beamer,nmbscode_beamer,merk_beamer,groote_beamer

     

    if i do this

    Patch( beamer; Defaults( uitleenbeamer); {product: "string"}; {'nmbs code': "string"}; {merk:"string"}; {groote: "string"})

     

    then it works

     

    so what is the problem here ?

     

     

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    I am lost in what you are asking.

    If you tried my code, what error did it give? You cannot patch one list referring to the defaults of another as you have done.

    Can we get back to basics please - you are trying to patch the contents of collection uitleenbeamer to your list beamer as new records?

    I will be offline shortly due to timezone.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard