Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Need to make a field calculate what is in another field and times that by a certain percent...

Posted on by 2,645

Hello,

I have a request for the following:

Field A is on one form(entity) in CRM and this field is formatted so only #'s can entered.

Field B is on a different form(entity in CRM and this field is formatted son only #'s can be entered.

Field C is on the same form as Field B and this is formatted as an option set pick list.

Field D is on the same form as Field B and this if formatted as an option set pick list.

Requirements:

Now, if Field A is filled in with a #, and Field C is equal to Handouts, then I need field B to be 25% of field A

If Field A is filled in with a #, and Field D is equal to Giveaways, then I need field B to be 50% of field A

Is this possible to do? 

*This post is locked for comments

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    Hi USA,

     I think it was already suggested before, but just in case..

     You should be able to create a calculated field in the "child" entity, and you can use "parent" entity fields in the conditions/formulas.

     So, basically, you just need to define a few conditions and, for each of those conditions, to define a different formula

     For example:

      Condition 1: Field A contains data AND Field C = Handouts. Action 1: Field B = 0.25 * Field A

      You'll find some useful info here:

    community.dynamics.com/.../useful-to-know-calculated-fields-functions-and-considerations-for-dynamics-crm-2015

      In particular, "You can access parental fields via the Lookup field to the parent entity, such as <LookupFieldName>.<FieldName>"

     Have you tried it?

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    I am not the best at writing a web resource in Java....would you be able to provide that for me?

  • Ridwan Profile Picture
    Ridwan 3,065 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    Yes it possible, You will have to use your web resource to write java script to call the functions of the fields stating that if Field A is filled in with a #, & d Field C is equal to Handouts, then field B to be 25% of field A, and your second statement should also goes with the provided requirement you needed too which is

    If Field A is filled in with a #, and Field D is equal to Giveaways, then field B to be 50% of field A.

    I hope this is helpful.

    Thank you

    Disu Ridwan

    Kindly mark if this answered your question.

  • Suggested answer
    SCV Profile Picture
    SCV 1,004 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    You will have to write javascript to achieve this. Register your functions on change of Field C, Field D and the lookup field on the form with field B.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    You can access field of Entity A in the calculation rule area. Just use EntityALookupField.FieldA and it should let you use it.

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    Field A is on the parent form, while Field B is on the child form.  

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Need to make a field calculate what is in another field and times that by a certain percent...

    Hi

    What is the relationship with the two entities (Entity with Field A and the Entity with Field B)?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans