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

Table4Smiley Tonguerovider

 

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.
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.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 369 members 4,690 guests
Please welcome our newest community members: