Copy data to seperate column, split() string by Space?

Hey there-

I’m trying to maintain column “Location” as is, and create 2 virtual columns.

Right now data auto-populates in Location as “200B 2A”
I’m trying to use the Split() function to separate that into a 200B column and a 2a column without affecting the source column.

Does anyone have any tips?

**Quick Tip: Ensure your new virtual columns are added to your slices.

@logan_juern
Provided you have that extra 2 columns in your gSheet back-end, you can below expressions in the AppFormula property of those columns:

IFS(ISNOTBLANK([Location]),INDEX(SPLIT([Location]," "),1))

IFS(ISNOTBLANK([Location]),INDEX(SPLIT([Location]," "),2))
1 Like

Thank you for your help!

I tried the above, but it produced nothing. Am I supposed to somehow duplicate the Location column data into the other two columns, then apply the formula?
How would I do that if the Location column is dynamic?

Levent’s first formula would go in your first VC, and second formula into the second VC.

@Marc_Dillon
Doesn’t matter actually. If you have physical columns in your gSheet, you can use both formulas in AppFormula where in each edit of the record, AppFormulas will be re-computed. If you don’t have a physical column, than Virtual Column (VC) is the only option.

@logan_juern
What do you mean with “…if the Location column is dynamic…”?

I’ve tried creating the columns by hand as well as virtually.
This is what I get when adding two virtual columns with their respective formulas:

By dynamic I mean the location column has records coming in perpetually.

@logan_juern
OK. If you are referring to a column in the same table, remove the [_THISROW]. prefix in front of the [Location] column in the SPLIT expression.

That worked perfectly! Thank you!

You’re welcome @logan_juern. Can you please mark my response as solution? It might be beneficial for other community members as well if and when they search the community with a solution tag. Thank you.

1 Like