cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplying two fields and adding the result to the third field

Former Member
0 Kudos

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.

Regards,

Pragati

Accepted Solutions (0)

Answers (1)

Answers (1)

lessip
Participant

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,

Patric

Former Member
0 Kudos

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.

Regards,

Pragati verma

Former Member
0 Kudos

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.

Regards,

Pragati Verma

sinaei
Contributor
0 Kudos

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;

Regards

Sin