Forum Discussion

AmandaTorrisi's avatar
AmandaTorrisi
Qrew Trainee
6 years ago

Extract a portion of plain text

I am simply trying to extract a portion of a regular text field.
So if the field [Job Number] is 12345-345-12-3456, I just want a formula that just extracts the 12345-345 into another field. 
I feel like it is something simply I just cant wrap my head around it. 
Thank you.

------------------------------
Amanda Torrisi
------------------------------
  • EricMohlman's avatar
    EricMohlman
    Quickbase Staff
    Using the Part and List functions from here:https://login.quickbase.com/db/6ewwzuuj?a=q&qid=12, your formula would look like this:
    List("",
    Part([Job Number],1,"-"),
    Part([Job Number],2,"-"),
    Part([Job Number],3,"-"),
    Part([Job Number],4,"-"),
    Part([Job Number],5,"-")
    )

    You could also keep the pattern going for however many sections you expect to need to combine together. If there are other delimiter characters you want to split on, you can also add those to the hyphen area.

    ------------------------------
    Eric Mohlman
    ------------------------------
    • AmandaTorrisi's avatar
      AmandaTorrisi
      Qrew Trainee
      That was exactly what I needed. Thank you so much for the quick reply!

      ------------------------------
      Amanda Torrisi
      ------------------------------