Hello friends.
i has tried, but i didn't have success.
i want change a multiple information in a excel file, this is the exemple:
This is the extract bank statemen, i want to change the name providier, the same data is the supplier's reference account, i filter the information in the first textbox1 (Tb1), second the provider name in the textbox2 (Tb2), with the button Multi, i want change my gallery, in the seccion "PROVIDER".
The issue:
i was use Patch, but it show a wrong. "type of argument not valid (Table). A Record value was expected instead"
Please, help me with my problem, i really want learn power apps.
My database: "_B2019"
Table1: Date
Table2: Concept
Table3: Amount
Table4:Provider
my supposed function:
Patch(BrowseGallery2.Selected;BrowseGallery2.Selected.PROVEEDOR;{PROVEEDOR:Textinput2.text})
or direct
Patch(_B2019;_B2019.Providier;{PROVIDER: Textinput2.Text})
What am i doing wrong?
Regards friends.
Solved! Go to Solution.
Hi @DIego_Canales ,
Do you want to change all rows in your _B2019 data source based on the matched Concept?
Based on the needs that you mentioned, I think the ForAll function could achieve your needs. Please consider take a try with the following workaround:
Set the OnSelect property of the "Mul" button to following:
ForAll( RenameColumns(Filter(_B2019; TextSearchBox2.Text in 'Concept'); "PrimaryColumn"; "PrimaryColumn1");
Patch(
_B2019;
LookUp(_B2019; PrimaryColumn = PrimaryColumn1);
{
PROVEEDOR: TextInput3.Text
}
) )
Note: The PrimaryColumn represents the primary column in your _B2019 data source, which could identify one record uniquely in your _B2019 data source.
Please consider take a try with above solution, then check if the issue is solved.
More details about the ForAll function and RenameColumns function, please check the following article:
Best regards,
Hi Diego,
I have never patched to Excel but I am sure it is the same as many other data sources. Try and filter on the unique key when you are patching and it should do the trick:
I think your key is : PROVEEDOR (Not sure. if it is not please change this with your unique key)
Patch(_B2019,First(Filter(_B2019, PROVIDER=gallery.selected.PROVIDER)),{PROVIDER:TextInput2.text})
Give that a try and let me know if it works for you.
thanks @myke_deabreu , you helped me to solve the first issue
this is the formula:
Patch(_B2019;First(Filter(_B2019;TextSearchBox2.Text in 'Concept'));{PROVEEDOR: TextInput3.Text})
the issue, i want change all the rows, but the condition First, only let me change one concept.
i tried use FirstN and ForAll, but i only can use First.
Could you have some idea?
Thanks for all.
Regards.
Hi @DIego_Canales ,
Do you want to change all rows in your _B2019 data source based on the matched Concept?
Based on the needs that you mentioned, I think the ForAll function could achieve your needs. Please consider take a try with the following workaround:
Set the OnSelect property of the "Mul" button to following:
ForAll( RenameColumns(Filter(_B2019; TextSearchBox2.Text in 'Concept'); "PrimaryColumn"; "PrimaryColumn1");
Patch(
_B2019;
LookUp(_B2019; PrimaryColumn = PrimaryColumn1);
{
PROVEEDOR: TextInput3.Text
}
) )
Note: The PrimaryColumn represents the primary column in your _B2019 data source, which could identify one record uniquely in your _B2019 data source.
Please consider take a try with above solution, then check if the issue is solved.
More details about the ForAll function and RenameColumns function, please check the following article:
Best regards,
User | Count |
---|---|
140 | |
133 | |
79 | |
75 | |
74 |
User | Count |
---|---|
210 | |
200 | |
71 | |
66 | |
55 |