Forum Discussion

SteveWellauer1's avatar
SteveWellauer1
Qrew Trainee
5 years ago

Clarification on the TextList feature

I want to split a text field by the space character, then I want to access the first and second items in the list. The help text for the split command says"  "Converts text string, in format of items list with custom separator character, to list structure. Each item can be processed separately."  I am assuming that means I can access each part separately by index or something simular, but I cant figure it out.

Here is my code: 

var textList name = Split([Attached Company Name], " ");
"FIN" & $name[0]

The code does not work,  it doesn't like me trying to access the zero index of the $name text list. How do I access the first element of list without knowing what it is and without using the string cutting functions (Mid / Left / Right)

------------------------------
Steve Wellauer
------------------------------

4 Replies

  • Hi Steve!

    Try using the PART function

    Part($name,1," ")

    Let me know if this helps 👍😊

    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------
    • SteveWellauer1's avatar
      SteveWellauer1
      Qrew Trainee
      Thanks for the quick response, I didn't know about the part function until now, however, your solution did not work. I used the answer below, Part([Attached Company Name],1," ").


      ------------------------------
      Steve Wellauer
      ------------------------------
  • Steve the first part will be

    Part([Attached Company Name],1," ")

    The 2nd part will be

    Part([Attached Company Name],2," ")

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • SteveWellauer1's avatar
      SteveWellauer1
      Qrew Trainee
      Great this worked, Thank You!

      ------------------------------
      Steve Wellauer
      ------------------------------