How to Concate three strings in Elasticcube or Designer

Answered

Comments

7 comments

  • Avatar
    Michael Becker

    H Sai,

    do it this way - [Product] +' | '+[Product_Family]. This will do what you require.

    Regards,

    Michał

    3
    Comment actions Permalink
  • Avatar
    Siva

    Thanks Michael. It is working. :)

    0
    Comment actions Permalink
  • Avatar
    Teh Wenhui

    Hi Michael,

    Do you mean this way?

    Concat([DescDueDate] + ' | ' +[Bank Reference No.])

    It gives me the error message of Concat(string) is not declared.

     

    Regards,
    Wen Hui

    0
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Hey @Teh 

    If both [DescDueDate] and [Bank Reference No.] are of string data type then you won't need the CONCAT function, it will be enough to use the '+' sign between them and the '|'.

    If they are not strings yet, you can use the TOSTRING() function before using the '+'

    Let me know if I can further clarify or if you need any further assistance, feel free to reach out,

    Thanks,

    Ido

    ido.darnell@qbeeq.pl

    0
    Comment actions Permalink
  • Avatar
    Teh Wenhui

    Hi Ido,

    Although both [DescDueDate] and [Bank Reference No.] are of string data type, '+' still not for me.

    Then I found this from the other post and it works.

    Concat(Concat([DescDueDate],' | '),[Bank Reference No.])


    Thanks and Regards,
    Wen Hui

    0
    Comment actions Permalink
  • Avatar
    Karen Rasnick

    I'm having a similar issue using string fields.  I tried Concat(Concat([FirstName].' '),[LastName]) , but it's adding additional spaces between the first and last name.  How do I resolve the extra spaces?

    Karen 

    0
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Karen Rasnick

    Try adding the trim() function around the [FirstName][LastName]

    Also, it seems you have a space between the [FirstName] and ')' in quotation marks,

    Try the following:

    Concat(Concat([FirstName].''),[LastName]) 

    Or  Concat([FirstName],[LastName])

    LMK if that works, always here to help

    Ido

    ido.darnell@qbeeq.pl

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.