cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vikas179
Regular Visitor

Unable to update calculated field in source excel file in One drive from powerapps

Team,

I have created a simple inventory management app. Where in user need to input OH_Box (on hand qty of Box);

after saving; the OH_Qty (on hand qty) is auto calculated by the app. Here, comes my doubt, this calculated value i want to update in my source excel file as well (its in One drive). I have created a column for the same too (OH_Qty)

below is the image.

 

i suppose i need to use patch function, but apparently i do not know how to use it. I also have created an email button, which sends the updated excel file from one drive to specified email recipient.

 

Regards,

Vikas

1 ACCEPTED SOLUTION

Accepted Solutions
Vikas179
Regular Visitor

Thanks @eka24 ,

 

I tried but it didn't work. So I changed the source from excel in One drive to a new list in sharepoint.

Making a new list in sharepoint solved my issues for calculated column.

 

View solution in original post

7 REPLIES 7
eka24
Super User
Super User

Insert a Button or an Icon inside the Gallery and OnSelect of the button:

Patch(ExcelTable,ThisItem,{OH_Qty:Label.Text})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Vikas179
Regular Visitor

Hello eka24,

I was trying to incorporate patch function in the accept icon that is part of default edit screen. but getting error as invalid argument.

can you pls help here?

 

Vikas179_0-1631857674161.png

 

Vikas179
Regular Visitor

Team,

Can any body help on above issue?

eka24
Super User
Super User

SubmitForm (EditForm1);

Patch(Table1, Defaults (Table1), {OH_Qty: Label1.Text})

 

Or

SubmitForm (EditForm1);

Patch(Table1, Defaults (Table1), {OH_Qty: Value(Label1.Text)})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Vikas179
Regular Visitor

Thanks eka24,

i tried but having error as shown in pic attached.

I have also uploaded my excel file, wherein i have OH_Qty column where i want to update the calculated qty from powerapp

If the field is autocalculated field, remove the column and re-create it again.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Vikas179
Regular Visitor

Thanks @eka24 ,

 

I tried but it didn't work. So I changed the source from excel in One drive to a new list in sharepoint.

Making a new list in sharepoint solved my issues for calculated column.

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,621)