Apptio for All

Apptio for All

A place for Apptio product users to learn, connect, share and grow together.

Β View Only
  • 1.  formula function to replace carriage return value from a string.

    Posted Mon September 06, 2021 01:45 AM
    Hi guys 

    are there any function or steps to remove carriage return formula from a string?
    #ApptioforAll


  • 2.  RE: formula function to replace carriage return value from a string.

    Posted Mon September 06, 2021 02:46 AM
    Edited by Guillermo Cuadrado Tue November 05, 2024 06:18 PM
    Hello @Roland Pendon.Try the ReplaceRegex() function.
    ReplaceRegex(column_name,match_expression,replacement_expression)

    You could write something like ReplaceRegex(column_name,"*\n*","* *")​
    I used it once upon a time, and can't quite remember the syntax, but it's worth trying/experimenting with.

    Apptio's (comprehensive) help file points to Regex Cheat Sheet and to https://regex101.com

    (Later)
    I run a small experiment and it worked:
    • I loaded an Excel file with a single column and a single row, where I had forced a <CR> with <ALT><ENTER>:
      My Column
      this column
      has 2 lines
    • I then added CleanColumn=ReplaceRegex(My Column,"\n"," | ")
    • This is what I got:

      I selected the solid bar for visibility.

    ------------------------------
    Regards, Guillermo
    ------------------------------



  • 3.  RE: formula function to replace carriage return value from a string.

    Posted Mon September 06, 2021 03:06 AM
    Hi @Guillermo Cuadrado thanks will try that and will get back to you if its working.​


  • 4.  RE: formula function to replace carriage return value from a string.

    Posted Fri July 26, 2024 06:53 AM

    3 years later and this has helped us out! Thanks Guillermo :)




  • 5.  RE: formula function to replace carriage return value from a string.

    Posted Fri July 26, 2024 09:25 AM

    😍😍😍



    ------------------------------
    Regards, Guillermo
    ------------------------------