cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lorem1960
Resolver III
Resolver III

When form is in New Mode then the Calculation works but Not when form is in Edit Mode?

I have a form that allows users to enter expenses in Euro, the form also contains the current ExchangeRate, when a users enters the Amount in Euro, the Amount in USD is calculated based using the below formula that is placed in the Default Property of the Item

named AmountUSD.

 

Coalesce(Parent.Default,Text(With({AE:Value(DataCardValueAmountEuro.Text),ER:Value(DataCardValueExchRate.Text)},AE/ER),"###.00"))

 

This works just fine, however, when my form is in Edit mode and a user wants to update the Amount in Euro or Update the Exchange Rate, the AmountUSD does not get calculated?

So it seems that when the form is in Edit Mode the above formulate does not get triggered.

 

Anyone has any idea why this happens? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@Lorem1960 

Coalesce() will supply the first Nonblank value.  In your case, when the form is in edit mode, Parent.Default exists so processing stops as there is already a value.  If you change the order as below, then your formula should reflect the change when you change the euro value.

 

Coalesce(Text(With({AE:Value(DataCardValueAmountEuro.Text),ER:Value(DataCardValueExchRate.Text)},AE/ER),"###.00"),Parent.Default)

 

 

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

@Lorem1960 

Coalesce() will supply the first Nonblank value.  In your case, when the form is in edit mode, Parent.Default exists so processing stops as there is already a value.  If you change the order as below, then your formula should reflect the change.

Coalesce(Text(With({AE:Value(DataCardValueAmountEuro.Text),ER:Value(DataCardValueExchRate.Text)},AE/ER),"###.00"),Parent.Default)

 

Drrickryp
Super User
Super User

@Lorem1960 

Coalesce() will supply the first Nonblank value.  In your case, when the form is in edit mode, Parent.Default exists so processing stops as there is already a value.  If you change the order as below, then your formula should reflect the change when you change the euro value.

 

Coalesce(Text(With({AE:Value(DataCardValueAmountEuro.Text),ER:Value(DataCardValueExchRate.Text)},AE/ER),"###.00"),Parent.Default)

 

 

Lorem1960
Resolver III
Resolver III

Great, thank you so much, learned something new - have a nice day.

v-xiaochen-msft
Community Support
Community Support

Hi @Lorem1960 ,

 

Have a nice day.

Has the issue been resolved?

If the issue has been resolved, you could mark the correct reply as a solution.

 

Best Regards,

Wearsky

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,724)