Planning Analytics

 View Only
  • 1.  How does one concatenate two strings in Ti?

    Posted Wed September 18, 2019 05:10 PM
    Edited by System Fri January 20, 2023 04:37 PM
    For the life of me, I cannot find a Concatenate function!

    EDITED: Apparently it's a single pipe. I did not see this in the docs - maybe I missed it.

    ------------------------------
    Shubho Ghosal
    ------------------------------
    #PlanningAnalyticswithWatson


  • 2.  RE: How does one concatenate two strings in Ti?

    Posted Thu September 19, 2019 10:25 AM
    Hi Shubho,
    I've been doing TM1 work for 10 years.  I don't believe I have ever seen the pipe operator documented either.

    But while you are investigating in the area of string concatenation, I would encourage you to google the EXPAND function.  I don't think it is very well documented either, but I rely on it for string substitution in preference over string concatenation.  When you start trying to build SQL strings for ODBC selection and have mixed use of single and double quotes, you will begin to understand why I prefer EXPAND.

    Gary​

    ------------------------------
    Gary Smith
    ------------------------------



  • 3.  RE: How does one concatenate two strings in Ti?

    Posted Thu September 19, 2019 10:32 AM
    Hi Gary,

    That is an interesting suggestion - will certainly look into it - thanks for that!

    Regards,
    Shubho

    ------------------------------
    Shubho Ghosal
    ------------------------------



  • 4.  RE: How does one concatenate two strings in Ti?

    IBM Champion
    Posted Thu September 19, 2019 01:47 PM

    Rules Guide:

    Concatenating Strings:
    You can concatenate strings using the pipe | character.
    For example, the following expressions returns Rheingold.
    (Rhein | gold)
    If the string resulting from a concatenation is longer than 254 bytes, TM1 displays
    an error message.



    ------------------------------
    George Tonkin
    ------------------------------



  • 5.  RE: How does one concatenate two strings in Ti?

    Posted Fri September 20, 2019 10:35 AM
    Thanks George - this is where I looked and did not find. This info should be captured here in the online version.

    https://www.ibm.com/support/knowledgecenter/en/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_ref.2.0.0.doc/c_textrulesfunctions_n8203e.html

    ------------------------------
    Shubho Ghosal
    ------------------------------



  • 6.  RE: How does one concatenate two strings in Ti?

    Posted Mon September 23, 2019 08:42 AM
    Thanks Shubho, we will definitely look into adding the Concatenating strings topic from the Rules guide (https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_rul.2.0.0.doc/c_concatenatingstrings_n9154c.html#ConcatenatingStrings_N9154C)  in to the TM1 Reference guide (where you were looking for this information).

    ------------------------------
    [Trish] [Smith] [MBA, BMath, Mom]
    [Content Developer]
    [IBM]
    [Ottawa] [ON]
    [613-356-5435]
    ------------------------------



  • 7.  RE: How does one concatenate two strings in Ti?

    Posted Mon September 23, 2019 12:34 PM
    Thanks, Trish - this will be helpful for future newbies.

    ------------------------------
    Shubho Ghosal
    ------------------------------