Return first value of a multiselection category field

Comments

3 comments

  • Rainer Grabowski

    Hi Pedro,

    it's:

    @week.sort()[0]

    where "week" should be replaced with the real name of the category field. 

    Rainer

    0
    Comment actions Permalink
  • Pedro Guede

    Hello! 

    Thanks for the response, and the last one. I would like to add a rule to assign a Podio Item Id for each week 

    Week 1 = Podio Item id 1

    Week 2 = Podio Item id 2

    And res = if First week is Week 1; Podio item id 1 

    And the same for the last one. 

    0
    Comment actions Permalink
  • Rainer Grabowski

    "Podio Item ID" isn't available in the calculation field (only if you have a text field where a flow added the Podio Item ID), available is the "Unique ID".

    The way to get conditinal results:

    var week = @week.sort()[0];
    week == "1" ? id1 : week == "3" ? id2 : ""

    read as: IF week equals 1 show id1, if week equals 3 show id3 else show "nothing" (field is blank)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk