Deleting end characters

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered
I'm having difficulty trying to strip out the middle of a text string. Below is an example of the record as it is entered into Quickbase in the field [Name]:

[NYC OM] On Model - Standard - /10222018_NYS1_UNREC_M_1869_OUTPUT/ColorCorrect/

What I want to display in a new field is:

10222018_NYS1_UNREC_M_1869_OUTPUT/ColorCorrect

So far what I have working is:

NotLeft(Trim([Name]),"/")

This works to trim off the beginning so that I have
10222018_NYS1_UNREC_M_1869_OUTPUT/ColorCorrect/

However I really want to get rid of that trailing backslash at the end. The problem is that I also need to make sure I keep the backslash separating the word OUTPUT and ColorCorrect.

I can't find a formula that works. There must be a way to just look at the very end of the whole string and remove one character, I just can't figure it out.
Photo of James Trory

James Trory

  • 856 Points 500 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 59,838 Points 50k badge 2x thumb
Try this

var text StepOne = NotLeft(Trim([Name]),"/");

IF(Ends($StepOne, "/"), NotRight($StepOne,1), $StepOne)
Photo of James Trory

James Trory

  • 856 Points 500 badge 2x thumb
Perfect! Thank you