Split Function for Formula

Hi, when formatting text I want to ensure Capital Case (i.e. each word capitalised) for example with names in a text field. While there are Upper(), Lower(), Find(), Trim() and ReplaceRegex() functions, there its no Split(text, text) function, which would split a given text into an array of texts to manipulate and then Join() back together. This would be very useful. Thanks!

i would also like to have a split function as i am importing a few documents that have valuable data in their name i want to split in table fields.

1 Like

Fibery doesn’t support string arrays, so implementing a dynamic Split function would be challenging.
I understand that @njyo’s need includes recombining with a Join function which would result in a single string, but maybe the effect would be best implemented as a single function (something like Map or ForEach) that operates on each word in a string.
Tbh, I think it’s unlikely to happen any time soon.
It’s more likely that there would be a specific Capital() function, but even that is not guaranteed :frowning:

For @dukevannori’s case, if the splitting is predictable (a guaranteed number of elements) it can probably already be done with combinations of Find() and Left() / Middle() / Right()

1 Like

One example would be the names of contacts that i stored “LastName, FirstName” in my Obsidian and also in Clickup.

Would be great to split those into two columns for better use in automations for emails etc.

then there is filenames that i used to store like this: “Date & Time (YYY-MM-DD HH:mm”) - (Type) - (Contact Names)

is that something i could split with your reccomendation?

1 Like

Yes.

For the first example

you would need something like the following formulas:
Middle(Name, Find(Name, ", ") + 1, 99)
Left(Name, Find(Name, ", ") - 1)

For this

you would use variations on this theme, like
Middle(Name,14,3 to get the year
Middle(Name,18,2 to get the month,
and so on, to get the date info.
(assumes that the values remain in the same position every time)

Where there is variability in position, e.g. if Type is a variable length word, I would suggest using a Middle function to strip the first X letters, and then applying the Find function to find the end delimiter, e.g.

e.g. Left(Middle(Name, 35, 999), Find(Middle(Name, 35, 999), ")") - 1)

Alternatively, if you fancy going down a rabbit hole, you can teach yourself regex expressions and use the ReplaceRegex function instead :wink:

Or perhaps other Fibery users in the community have even better ideas :crossed_fingers:

1 Like

everything is possible it seems, even though often times i wonder if it needs to be so complicated :slight_smile:

1 Like

Yeah, I hear you. Unfortunately, our developers are a precious resource, and every little request (“Can it be made to do xyz? It’s just a small thing…”) that they work on is time spent away from some other feature that we (or other users) think is at least as important :person_shrugging:

The workarounds are really just our way of apologising that the feature that is needed is not yet available :cry:

1 Like

totally understandable and greatly appreciated that you even take so much time and effort to help us users when we get stuck in our ways :slight_smile:
you are doing an amazing job. it’s one of the reasons why i investigate this as a clickup alternative in the future

1 Like

Yeah, a Map or ForEach function could work. I actually even wouldn’t mind if it’s just done as a full-on Regex function, where I can manipulate the matches…

But I understand the resource limitations. :wink:

1 Like

I’m trying to do a very simple thing and I’m not able to get it right.

I’m trying to get the First Name of the Name property, however the formula doesn’t output what I want, which is the first name.

I tried the formula shared here, I tried the formula generated by AI, even review what would be the output of this formula on ChatGPT.

The formula below is not outputting “Renato” and instead is outputting “Renato Luiz de Carvalh”

Left(
  Trim("Renato Luiz de Carvalho"),
  Find(" ", Trim("Renato Luiz de Carvalho")) - 1
)

What am I doing wrong? :face_with_peeking_eye:

Check out how the Find() function works.
You are searching for “Renato Luiz de Carvalho” within the string " "

On Make, doing that is very simple:

So far, I couldn’t find a simple way of doing that in Fibery.

first(split(full_name; space))
last(split(full_name; space))

Fibery doesn’t allow for arrays of strings. So we have to solve text related challenges differently.

1 Like

Yes, I realized that :sweat_smile:

Could someone explain how to implement this example in Fibery? I’ve reviewed the documentation and examples but haven’t found a clear solution.

If this is meant to be straightforward in Fibery, I’d appreciate guidance on the recommended approach. What would be the best way to structure this in Fibery’s system?

How to implement what?

I need help with a formula that extracts the first and last words from a text field containing a person’s full name. For example, if the field contains ‘Renato Luiz de Carvalho’, I want the formula to return ‘Renato Carvalho’. How can I write this formula in Fibery?

ReplaceRegex(Name, "(?<= )\w+ ","")

1 Like

Thanks Chris.

And to get only the first word/name, I used this formula here, it worked:

ReplaceRegex(Name, " .*$", "")

So for “John Michael Smith” it will remove everything from the first space onwards, giving you just “John”.

p.s. I had to ask Claude to help me generating the formula. The AI inside Fibery that helps to generate formulas didn’t help me in this case. Although I was explicitly asking help to create a Regex.

Testing out Fibery after building an entire workspace in Coda, and wow—Fibery’s formulas are brutal.

Tried splitting a Full Name field into First and Last Name—no luck. The AI generator failed, ChatGPT and Claude struck out, and what took seconds in Coda or Notion ate up an hour in Fibery. Ended up copying a regex formula from @Renato_Carvalho just to make it work.

Fibery, please tell me you’re working on this. You were my last hope for a solid Coda/Notion alternative.

2 Likes

As @helloitse said

So I’m not sure what you were hoping the output(s) would be.
Where are you thinking that the results would end up?

If you need to get the first name (word) in a string, you can use something like this:

Left(Text, Find(Text, " ") - 1)

If you need to get the last name (word) in a string, you could use something like this:

Middle(Text, Find(Text, " "), 999)

if you can assume that the original string is two words.

Otherwise, you can use regex constructions to accommodate more complex inputs, but the bottom line is that a formula can’t produce an array, so you need to calibrate your expectations to take that into account.