cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Resolver III
Resolver III

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.

Highlighted
Frequent Visitor

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.

Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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