Pulling values from a normal text array

Not sure if I’ve worded that 100% correctly but basically values are being returned like so in a basic text column:
Screenshot 2024-02-14 125331
I was using the extract if text matches at first but then realised people often use custom number plates so that would not work(since thats one of the things we’re trying tp pull).

I attempted using ChatGPT and they said you can treat it as an array and extract like that however their javascript code isn’t working. Could anyone come up with a code/have any idea how to pull singluar data from that screenshot.(ie if we just wanted to pull the TOYOTA part or anything else)

Not sure I fully understand what you are asking, but what I’m getting out of this is that you have text that is percent delimited. You want to convert it into an array, and then retrieve values out of the array.

You can use a Split Text column to split it into an array.

Then use a Single Value column to retrieve values out of that array. As long as the number of array items is consistent and everything is in the same order, it should be a problem.

1 Like

I’m impressed that you went to the trouble of typing that all out (or did you use some other sneaky method?)

@MattGlides - you could have saved Jeff a whole bunch of typing if instead of giving a screenshot of the data, you gave an actual sample of the data that could be copy/pasted :wink:

It’s super easy on Android. :wink:

I just select the image or take a screenshot, select ‘Search image with Google Lens’, and it does the rest. Also incredibly useful for translating text in screenshots on the fly.

I used Google Lens a lot when I went to Quebec last summer, which is primarily French. Hold the camera up to a menu or any sign and it translates to English in real time.

2 Likes

Thank you I didn’t even think of that, ended up using a bit of my knowledge and chatgpts to come up with this:
Screenshot 2024-02-14 155515
And it seems to be working:
Screenshot 2024-02-14 155528
I don’t know if your way is more efficient/will cause less issues in testing(only done 2 cars so far) so we’ll see! Thank you.

My way is probably a bit more efficient because it’s not performing a javascript split multiple times. With my way you split once and then use several Single Value columns to retrieve each value from the array. Easier to maintain too.

1 Like

I do use javascript a lot, but I tend to find that native columns are a bit faster, so if possible I try to use native columns.

2 Likes

Understood, thank you so much (: learnt 2 things out of one problem that will both be useful in the future so a very good outcome.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.