Skip to Content

Multiplying two fields and adding the result to the third field

Aug 02, 2017 at 12:29 PM


avatar image
Former Member

Dear Experts,

I have the requirement where I want the result as A=(B*Constant field)+C. These three fields are amount field. Request you to please help. I want to add all these fields and do the operations in opportunity header part.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Patric Leßmann Aug 02, 2017 at 03:41 PM

Hi Pragati,

what is your exact problem or question?

In general you can achieve this using the KeyUserTools (no need of Cloud Application Studio) by

  1. entering adaptation mode
  2. adding an additional field
  3. checking "calculated"
  4. defining your formula to calculate the value.
  5. leaving adaptation mode ;-)

Best regards,


Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Patrick,

This is the scenario.

There are three fields

1) A=100 INR(Indian National Rupee Currency)

2) B=12 months

3) C= 100 INR

Now we have the requirement to do this operation

(A*B)+C=D( D is another custom field)

I have tried it with the KUT but when try to do the operation (A*B)=X(Storing the result in field X)

I am not able to do X+C=D as the field "C" is not available while trying to do this operation.

Request you to please help.


Pragati verma

Former Member

Its done.

import ABSL; //import AP.FO.BusinessPartner.Global; import AP.Common.GDT; import AP.FO.BusinessPartnerRelationship.Global; import AP.CRM.Global; import AP.FO.Activity.Global; foreach (var customer in this) { var Constant=this.GetFirst().Month; var MR= this.GetFirst().MRC.content; var NR= this.GetFirst().NRC.content; var Multiply=MR*Constant; var F=Multiply+(NR); this.GetFirst().Fi=F.ToString().TrimRight("0"); }

but it just shows the result as 130.0000 I tried trimming so it shows now 130.

I want to just display 130.00 only two zeros after decimal.


Pragati Verma


Hi Pragati,

If you want to have two decimal, you should define your custom fields in a way that can show just two decimal.

Here in your case:

[Decimal (10,2)][Label ("F")] element F : DecimalValue;