truncate the value of a SharePoint column from a character and paste it on a calculated column

Copper Contributor

Hello :smile:

 

I would like to truncate the value of a SharePoint column from a character (ex: "_") and paste it on a calculated column.

 

Anyone know the right formula?

 

 

Thanks :)

2 Replies

@slm755 

You can use combination LEFT/RIGHT & FIND functions to extract the substring of text column.

 

For Example: You have a column with name "User" & value "John_Doe"

 

You will get "John" by using below formula:

 

=LEFT([User],INT(FIND("_",[User])-1))

 

And you can get "Doe" by using below formula:

 

=RIGHT([User],LEN([User])-INT(FIND("_",[User])))

 

ReferenceUsing calculated field to retrieve substring of another field 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

I need to be able to truncate the filename off of the URL of a file in a library to get to the folder holding the file. The problem is there are two many "/" so I how do I search back from the end of the URL to first "/" and get rid of everything to the right (the filename) and keep the truncated path? I can never be sure how many "/" there are since I don't know what the folder structure will be. I need this path for a Content Type Workflow and I am using 2010 workflows, at least for another 8 months.
Thanks for any assistance.