Announcement

Collapse
No announcement yet.

Calculated Field with IfThenElse don't work for me

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculated Field with IfThenElse don't work for me

    Hello,
    i try to set a monthly fee for the entity "Vertrag" based on a selected "produkt". I use this code

    Code:
    ifThenElse(
        entity\isAttributeChanged('produkt') && produkt = 'Basic Webseite',
        mtlVertragswert = 179.00,
        ifThenElse(
        entity\isAttributeChanged('produkt') && produkt = 'Premium Webseite',
        mtlVertragswert = 349.00,
        ifThenElse(
        entity\isAttributeChanged('produkt') && produkt = 'Local Marketing Plus',
        mtlVertragswert = 79.90,
        ifThen(
        entity\isAttributeChanged('produkt') && produkt = 'Local Marketing Profi',
        mtlVertragswert = 99.80
        ))));
    The only result I can see is, that the monthly fee is 179.00 € no matter which "produkt" is selected.

    What is the fault?

    Thank you all for helping me.

    Greets
    Dennis

  • #2
    Hello, use this formula:
    ifThen(produkt == 'Basic Webseite', mtlVertragswert = 179.00);
    ifThen(produkt == 'Premium Webseite', mtlVertragswert = 349.00);
    ifThen(produkt == 'Local Marketing Plus', mtlVertragswert = 79.90);
    ifThen(produkt == 'Local Marketing Profi', mtlVertragswert = 99.80);

    When you will change one of this product and click save, the mtlVertragswert will change automatically.
    Last edited by Maximus; 03-08-2019, 12:21 PM.

    Comment


    • #3
      Hi Maximus,

      thank you. What a stupid mistake ...

      Comment

      Working...
      X