Is there a character limit to the size of a string that can be used as an argument in a string function in a calculated field?

I am trying to extract information out of a comma delimited string in the format:

Category.x.xxxxx.xxxxx, Category.x.xxxxx.xxxxx and so on.

This string is 8172 characters long.

I am storing the string itself in a calculated field called ‘CF_CategoryGovernance’ as the string itself will be amended over time and it means we only have to update this field and the rest of the CFs that use it will still work.

The calculated field that utilises the above field, and that is causing the issue is:

ifelse(locate({CF_CategoryGovernance}, Category, 1)=0, “”, substring({CF_CategoryGovernance}, locate({CF_CategoryGovernance}, Category, 1), strlen(Category)+14))

‘Category’ is a string field containing a list of categories that i am searching for inside of the large string stored in the CF_CategoryGovernance field. The rest just extracts the delimited text that sits with the category name in the large string.

The calculated fields compiles and saves correctly. But the field displays no value.

If however I half the size of the string, it shows the expected result. I have tried running this with string sizes up to around 8000 characters before its stops working.

Is there a string limit when being used in string functions? And if there is, how can i get around this?


There’s a thread with tips and tricks on how to handle long strings here - Rendering long strings, greater than 2,047 characters

Also, there is a product feature request to increase this size, but there’s not date associated with it, yet.

Hope that helps.


Thank you. I do want to check however, in this thread you have supplied it is talking about number of characters visualised having a limit, whereas I am specifically talking about the size of the string available to be used as an argument in a function. The output from my calculated is only about 50 characters so its not the resulting visualisation being limited causing my issue, but the apparent limit on being able to use a large string as a function argument. Happy that the answer is that there is a limit, but just want to make sure that the feature recommendation you are referring to is to increase size of strings used in function arguments as opposed to just visualising the string in a field? If both issues are caused by the same limitation and hence the same fix would resolve then so be it. Just want to make sure its documented appropriately.

That’s a good callout, @leftyrighty! Thanks! I see that this is also missing from the docs. I’ll follow-up on both of those.

Meanwhile, I had hoped that some the techniques in that thread would be useful.

1 Like