Function to get the label of an enum attribute value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • axyl
    Member
    • Jun 2021
    • 32

    Function to get the label of an enum attribute value

    I have a CONCAT function that's joining two attribute values, but I'd like the values to be the label value rather than the internal value of an enum attribute. Any ideas on how I might be able to do that?

    i.e.
    Code:
    CONCAT:(assignedUser.firstName, ' - ', status)
    I'd like the value of status to be the label value.

    Cheers.
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    you can try the formula array\at(LIST, INDEX), e.g:

    Code:
    $status = array\at('status', 1); 
    
    CONCAT:(assignedUser.firstName, ' - ', $status)
    i have not tested this so you might try it and see if it works.
    Rabii
    Web Dev

    Comment

    • item
      Active Community Member
      • Mar 2017
      • 1476

      #3
      if understand, label is language dependant, maybe : https://docs.espocrm.com/administrat...ranslateoption
      If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

      Comment

      • axyl
        Member
        • Jun 2021
        • 32

        #4
        Hmm, I think this has to work without the Complex Equations structure.

        So just using formula's won't do it. Complex Equations, seem to me, to be some kind of text -> SQL structure?

        Comment

        Working...