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

manitpulate tabel

 
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


13 REPLIES 13
Highlighted
Super User III
Super User III

Re: manitpulate tabel

@ruben-dw ,

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.

Highlighted
Helper I
Helper I

Re: manitpulate tabel

like this

:

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

 

Highlighted
Super User III
Super User III

Re: manitpulate tabel

@ruben-dw ,

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.

Highlighted
Helper I
Helper I

Re: manitpulate tabel

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}

 



Highlighted
Helper I
Helper I

Re: manitpulate tabel

@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

Highlighted
Super User III
Super User III

Re: manitpulate tabel

@ruben-dw ,

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.

Highlighted
Helper I
Helper I

Re: manitpulate tabel

@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 ?

Highlighted
Super User III
Super User III

Re: manitpulate tabel

@ruben-dw ,

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

Highlighted
Helper I
Helper I

Re: manitpulate tabel

@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 ?

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,695)