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

this is the table beamer

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

this is the document where the tables are located

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.
like this
:
Patch (beamer; Defaults (lending beamer); {product: product_beamer}; {'nmbs code': nmbcode_beamer}; {brand: brand_beamer}; {size: size_beamer})
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.
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}
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
so how can i fix this that this is a string
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.
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 ?
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 ?
User | Count |
---|---|
174 | |
111 | |
86 | |
44 | |
42 |
User | Count |
---|---|
229 | |
118 | |
118 | |
74 | |
67 |