Split field into 2 substrings

As part of a partner integration, I’m getting a value that I need to split into 2 strings.

The first part is always 32 characters long (a user ID), and the second part is variable. So, it might be:


Where I want “dUEwKHwgfTrGc0rHfbdl9jy97uznhqYy” and “testaff”.

That’s coming in as one field, and I’d like to put the first 32 characters into a different field, and the remaining characters in a second field, like:

original_field: dUEwKHwgfTrGc0rHfbdl9jy97uznhqYytestaff
new_field_1: dUEwKHwgfTrGc0rHfbdl9jy97uznhqYy
new_field_2: testaff

I could obviously use right(original_field, 32) to get the value for new_field_1. But any ideas on how I can get the value for new_field_2, since the number of characters will be variable?

Hello Matt,

You can try the below text formula.

replace({Text},{first}, )

Text= dUEwKHwgfTrGc0rHfbdl9jy97uznhqYytestaff
first = dUEwKHwgfTrGc0rHfbdl9jy97uznhqYy

Sunny Singla

1 Like

Hey @Sunny_Singla - hope you are keeping safe and well :pray:

This is a very simple, elegant but powerful solution to this problem. I was scratching my head when I read this. I hadn’t thought of looking for the value and “replacing” it with ‘blank’ leaving the remaining characters.

A really clever solution with some simple text formula using the replace function. I was thinking how to ‘split’ the string, but this is not an operator :thinking:

I take my hat off to you Sir :+1::tophat:

1 Like

Thank you very much @CarlHolmes .

I’m well, hope you are well too.

Sunny Singla

1 Like