Cannot use field with type checklist in flowchart conditions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • armen
    Junior Member
    • Aug 2021
    • 20

    Cannot use field with type checklist in flowchart conditions

    Seems i cannot use field type checklist in flowchart conditions,
    i simple don't see any checklist type field in add condition window input to choose.
  • dimyy
    Active Community Member
    • Jun 2018
    • 569

    #2
    For the checklist you can use array\includes()

    Condition example:
    Code:
    array\includes(weekDays,datetime\dayOfWeek(datetime\now()))

    Comment

    • armen
      Junior Member
      • Aug 2021
      • 20

      #3
      Originally posted by dimyy
      For the checklist you can use array\includes()

      Condition example:
      Code:
      array\includes(weekDays,datetime\dayOfWeek(datetime\now()))

      Hi thanks for quick replay,
      Actually i need to use checklist type field in Flowcharts - > Conditional Start Event -> add condition selectbox (see screenshot) not via code as you suggested.

      Can you help me with this ?
      Attached Files
      Last edited by armen; 08-26-2021, 09:45 AM.

      Comment

      • dimyy
        Active Community Member
        • Jun 2018
        • 569

        #4
        Don't touch "add condition". You should use the "formula"
        Attached Files

        Comment

        • armen
          Junior Member
          • Aug 2021
          • 20

          #5
          Originally posted by dimyy
          Don't touch "add condition". You should use the "formula"
          Ok i see, i did as you suggested just I'm new to formulas
          and i don't understand how to return from formula some positive result so that
          "Conditional Start Event" will start

          ---
          doAction = 0;

          // here i want to check if tags( it is checklist type field) is empty
          ifThen(tags=="", doAction=1)

          // here i want to check if tags contain some test option
          ifThen(array\includes(tags, 'test'), doAction=1)

          //how to retrun doAction ?? so that "Conditional Start Event" will be triggered ?
          --

          you can see also pic



          Attached Files

          Comment

          • dimyy
            Active Community Member
            • Jun 2018
            • 569

            #6
            Formula interpretation (screenshot)

            Condition:
            Code:
            array\includes(tags, 'test')
            without semicolon
            Attached Files

            Comment

            • armen
              Junior Member
              • Aug 2021
              • 20

              #7
              Ok thanks it working.

              And is there anyway to write multiple tags check at once ( multiple conditions if one of them is true then start ) ?

              Comment


              • dimyy
                dimyy commented
                Editing a comment
                Code:
                array\includes(tags, 'test') || array\includes(tags, 'test2') || array\includes(tags, 'test3')
            • armen
              Junior Member
              • Aug 2021
              • 20

              #8
              thanks !

              Comment

              Working...