Platform

Platform

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

 View Only
  • 1.  Trim Numbers from field

    Posted Thu May 14, 2020 07:29 PM

    Is there are way in CT trim the ending numeric characters off a field?  For example, if I had a job title of "Project Manager 1", is there are way to trim the " 1" off the end of the title so it would group all levels of Project Managers together.  I would be doing this for several current job titles and ones created in the future, so I want a way to do this with a formula, not just create a lookup table based on the existing job titles. 

     

    @Josh Koziel

    @Abra McCollum

    @Kendra Elliott

    @Chris Davidson


    #Platform


  • 2.  Re: Trim Numbers from field

    Posted Thu May 14, 2020 10:28 PM

    Hi Doug

    Please try these:

    1. Trim and if in the formula:

    E.g.: trim(if(search("",Name)>0,Upper(Split(Name,2,"")),Upper(Name)))

     

    2. Use a helper to get all the Project managers to a column, and then use a look up.

     

    Thanks

     

    Dhivya Shyam


    #Platform


  • 3.  Re: Trim Numbers from field

    Posted Fri May 15, 2020 05:20 AM

    Hi all,

    alternatively you can also use regular expressions.

    =ReplaceRegex(JobTitle,"\s\d+","")

     

    If "JobTitle" is your attribute with the titles "Project Manager 1" / "Project Manager 2":

    you are searching for a pattern of:
      "a blank character (\s) following by any number of digits (\d+)"

    and replace it with nothing (""). 


    #Platform