cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DIego_Canales
Level: Powered On

Multi save data in excel

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:

CHNAGE 1.JPG

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Multi save data in excel

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:

ForAll function

RenameColumns function

 

Best regards,

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

View solution in original post

3 REPLIES 3
myke_deabreu
Level 8

Re: Multi save data in excel

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.

DIego_Canales
Level: Powered On

Re: Multi save data in excel

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.

Community Support Team
Community Support Team

Re: Multi save data in excel

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:

ForAll function

RenameColumns function

 

Best regards,

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

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,410)