Formula "ifthen"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • McBrumm
    Member
    • Jun 2021
    • 56

    Formula "ifthen"

    Hi,
    I need help with a formula. I have 3 fields and a checklist

    I want to sum field2 and field3, it´s easy

    field1 = field2 + field3;

    Now I want to sum the 2 fields if the checklist1 = "ok". what does the formula have to look like? I don't get along very well with the "ifthen" function
    thank you very much
    kind regards
  • dimyy
    Active Community Member
    • Jun 2018
    • 569

    #2
    Example of ifThenElse
    weekDays is CheckList field.

    Code:
    ifThenElse(
    array\includes(weekDays,datetime\dayOfWeek(datetim e\now())),
    description = string\concatenate('Поле дней содержит текущий день: ',datetime\dayOfWeek(datetime\now())) ,
    description = 'Поле дней НЕ содержит текущий день'
    );

    Comment

    • McBrumm
      Member
      • Jun 2021
      • 56

      #3
      Sorry, i don´t get it...
      If it´s possible to change the formula with field1, field2, field3 and checklist1 please?

      Comment

      • dimyy
        Active Community Member
        • Jun 2018
        • 569

        #4
        What type of 'checklist1' field?

        Comment

        • McBrumm
          Member
          • Jun 2021
          • 56

          #5
          you mean the value of the checklist? value ="ok"

          Comment

          • dimyy
            Active Community Member
            • Jun 2018
            • 569

            #6

            Code:
            ifThen( array\includes(checklist1,'ok'), field1 = field2 + field3);

            Comment

            • McBrumm
              Member
              • Jun 2021
              • 56

              #7
              many many thanks

              Comment

              Working...