Skip to main content
I'm working on creating a workflow that does the following:

 

Based on the value chosen in a picklist, calculate a result in a separate field.  For example, if value "A" is chosen in the picklist, then calculate the "Amount" field * 90%.  If value "B" is chosen in the picklist, then calculate :Amount" field *60%

 

Any help is apprciated.
2 respostas
  1. 10 de mai. de 2018, 14:05

    You can simply create a Formula Field for this = 

    1. Label: Discounted Amount
    2. Type: Formula
    3. Return Type: Number
    4. Formula: 

      Amount - (

      CASE(

      Picklist_Field__c,

      "A", 0.9, /* 90% */

      "B", 0.6, /* 60% */

      "C", 0.3, /* 30% */

      NULL

      ) * Amount

      )

      In here we are calculating the Discounted Amount. For example if the Amount was 1000 USD and the Picklist Value is 30% then the calculation is -

      1000 - (1000 * 0.3) = 1000 - 300 = 700

    In case if you just want to show the Discount Amount solely then this = 

    CASE(

    Picklist_Field__c,

    "A", 0.9, /* 90% */

    "B", 0.6, /* 60% */

    "C", 0.3, /* 30% */

    NULL

    ) * Amount

    This will yield: 300 USD

0/9000