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

Calculation Field in Model Driven App not working

I have two fields that are set to perform calculation but nether field is doing the calculation.  See below.  I don't see option that I need to select to make the calculation automatic.

 

 

 

InnerCityMatt_0-1618532475328.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @InnerCityMatt,

 

Yes, all the fields used in the calculation must have a value for the calculation to work. You may want to add some additional conditions to account for the cases where some of the fields don't have data.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

6 REPLIES 6
ChrisPiasecki
Super User
Super User

Hi @InnerCityMatt,

 

Calculated fields are computed when retrieving a record (e.g form load or shown on a view), and will not automatically update in the user interface when immediately changing a field value. You'd have to save the record and cause a refresh in order to see calculated field update as the record will be retrieved again.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

I have been doing that.  I imported a large data set to the table with values in the fields that are used in the calculation.  I have click refresh and opened up records in the form but still, no calculations are being performed.  I am still working in the solution.  

Hi @InnerCityMatt,

 

Have you published customizations? Also, are those fields used in the calculations just simple decimal types/whole numbers, or are you referencing any other calculated fields?

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

dpoggemann
Solution Sage
Solution Sage

Hi @InnerCityMatt,

 

A few things to check:

1.  Set the calculation to a simple value to verify the calculation is firing.  Example, set to a single value or something like that, this will help to verify that the calculation is actually taking place on the field.

2.  If this works add additional calculations step by step until it fails to see what is causing the issue.

3.  Verify your output format is acceptable based on the calculation (i.e. if calculation causes a decimal value that it is decimal)

4.  Verify the calculation is not pushing the value past a maximum or below a minimum defined for the field

 

Hopefully these steps help.  Please mark accepted if answers and Like if it justs helps.

 

Thanks!

Drew

The calculation is Set CICIncome(Currency) to (Premium(Currency) * CICCommisionrate(Decimal))  + CICFee(Currency)

 

 

Here is what the form looks like.  Does every field in the calculation have to have a value of at least 0 before the calculation can be performed?

 

InnerCityMatt_0-1618536366460.png

 

I have clicked published on the form

Hi @InnerCityMatt,

 

Yes, all the fields used in the calculation must have a value for the calculation to work. You may want to add some additional conditions to account for the cases where some of the fields don't have data.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (64,574)