cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ihebc
Level: Power Up

Calculated filed PowerApps

Hello Power Community,

It's my first application with PowerApps and SharePoint and i need some help.

So i create a SharePoint List and a PowerApps application connected to this list, in the list i have a calculated filed [=DATEDIF(Du;Au;"d")].

In PowerApps the column is calcultaed when only i submit the form but i need to calculte it when i chage Dates value.

 

Thank you

2 REPLIES 2
Dual Super User
Dual Super User

Re: Calculated filed PowerApps

Calculated fields in SharePoint are set AFTER the record has been saved.  So if you need the value to update while you are making changes inside the PowerApp then you'll need to have the PowerApp make and save the change, instead of relying on a calculated field.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Calculated filed PowerApps

Hi @ihebc ,

Could you please share a bit more about your scenario?

Do you want to calculate the calculated field within your app when you change the Dates value?

 

If you want to calculate the calculated field within your app when you change the Dates value, I afraid that there is no way to achieve your needs in PowerApps.

Currently, the Calculated field in SP List would be rendered as Read-Only field in PowerApps app. We could not specify/assign any value for this Calculated field in PowerAps app. The Calculated field would be calculated by SP System after you add a new record or edit an existing record.

 

As an alternative solution, I think it is not necessary to add a Calculated field in your SP list to store the date value difference, instead, you could consider add a Number value within your SP List, then do the date value difference calculation (using DateDiff function) within your app, then save the result back to the Number field in your SP list.

On your side, please consider add a Number field, called "DateDifference". Then re-generate a new app based on your SP list. Within the Edit form, set the Default property of the Text Input box within the DateDifference data card to following:

DateDiff(DuDatePicker.SelectedDate, AuDatePicker.SelectedDate, Days)  /* <-- I assume that the Du represents the Start date, Au represents the End date */

or

Value(DateDiff(DuDatePicker.SelectedDate, AuDatePicker.SelectedDate, Days))

Please consider take a try with above alternative solution, then check if the issue is solved.

 

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,097)