cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Calculated fields in Excel (OneDrive) not updating when patching from PowerApps

Hello everyone,

 

I have a table as a data source in Excel (OneDrive), let's call it Table1, and I'm trying to patch new registers from PowerApps using data coming from a form.

 

Table1 looks like this:

 

Name                               Quantity                                     Cost                       Total                   Status

Daniel Surname2$30,000$60,000Approved
Maria Surname3$35,000$105,000On-hold

 

Where Total is the result of Quantity * Cost (via Excel formula).

 

In PowerApps, users fill in data for Name, Quantity, Cost and Status and push a button that patches it to the Excel table:

 

Patch(DataSource; Defaults(DataSource); {Name: Name_TextInput.Text; Quantity: Quantity_TextInput.Text; Cost: Value(Cost_TextInput.Text); Status: Status_TextInput.Text})

So far I've been able to collect the data and add it to Table1. However, the calculated column Total is missing all the values (not just the one from the newly created record).

 

Problem 1: The Total value is not being calculated for the newly created register. Is there a way to keep the calculated column other than patching also the calculated value?

Problem 2: The Total value for the existing registers is getting deleted in the data source, not in the table I have in PowerApps. Is there a way to prevent this?

 

Thank you in advance for the help!

 

P.S: PowerApps formula might differ a bit if you're not using the European version. Probably only the semicolons instead of commas.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Calculated fields in Excel (OneDrive) not updating when patching from PowerApps

Hi @PowerAppsDaniel ,

 

It is known that if the excel table contains calculated value, then the existing records won't show in PowerApps. 

 

But you should be able to add new records to excel table using PowerApps. And you can set below formula in the Default property of the textinput control in Total data card to achieve the calculation.

 

DataCardValue1.Text * DataCardValue2.Text

 

Regards,

Mona

Community Support Team _ Mona Li
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

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Calculated fields in Excel (OneDrive) not updating when patching from PowerApps

Hi @PowerAppsDaniel ,

 

It is known that if the excel table contains calculated value, then the existing records won't show in PowerApps. 

 

But you should be able to add new records to excel table using PowerApps. And you can set below formula in the Default property of the textinput control in Total data card to achieve the calculation.

 

DataCardValue1.Text * DataCardValue2.Text

 

Regards,

Mona

Community Support Team _ Mona Li
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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,555)