Max length of text field

It seems like the Text field cannot take more than 1000 characters.
Although I can imagine someone reasonably arguing that no-one should need more than 1000 characters for a simple text string :roll_eyes: I have found myself writing formulas that generate text strings (including URLs) that are more than 1000 characters.
Can the limit be increased? or is there any workaround?

I was just bitten by this limitation as well.

(Even the User Guide says it should be 5000 characters:
Fibery)

I hit this limitation in Formula field where it’s output is a text field. Specifically a formula that joins all related entity’s public ids in order to check for “contains”. Using this trick: "Contains" formula function - #3 by RonMakesSystems

After there were 300 related entities, this business critical functionality is now broken…

I think i will edit it to use | instead of {} to reduce character count for the time being, but it’s just a problem waiting to show up again…

1000 characters is really quite small when it comes to data amount… it’s like 1kb… Is there any chance to bump this value up to like 10,000 characters? 10kb? I know everything needs some kind of upper limit, heck even rich text fields have an upper limit (2.7mb), but if we could bump this up, at least until there’s a proper “contains” function in formulas, that would be very appreciated!!

are there plans to increase that limit?

for context, I am fetching content from connected pages via JS, string in text fields, and then creating PDF - currently need to split across 16 text fields so that it works (due to hitting length limit in the text field)

probably not very elegant - how else could I accomplish creating one PDF report accumulating data from connected entities?

why you use text fields? why not rich text fields?

tried that

  1. the script threw “Cannot parse “” entity “” field” with updateEntity on rich text fields (but not on text fields)
  2. I’m injecting each field’s raw string straight into the HTML template, so plain text is what I want. I need the literal HTML string, not a structured doc. My script builds that HTML by collecting and formatting table views from connected entities, which is why it gets large enough to need splitting.

it does work and the created PDF looks beautiful and custom, but well, split across 16 text fields

You need to read how to update rich text fields - they don’t use updateEntity, they make use of setDocumentContent instead.
There are a few examples here in the community.

Rich text fields will happily take plain text. Although they allow formatting, it’s not mandatory :blush:

Ran into this again… Now I need to make a more proper solution somehow… Still working it out, will share when done.

For now, wondering if it’s possible to throw an error when a formula field is MEANT to resolve to more than 1000 characters, but the field limits it. Because now its failing silently and things are breaking.

I think the only solution is to wrap the formula in a length check, and return some text to indicate if over 1000 chars

In my case the formula is not to be viewed by the user. It is a solution to the lack of “Contains” function in formulas.

I’ll share the full case.

Databases:
Document has many categories
Document has one supplier

Category has many documents
Category has many relevant suppliers

Supplier has many documents
Supplier has many relevant categories

The formula should be on the Document DB, and answer the question: Are there any categories on this document which are not part of this document’s supplier’s relevant categories?

The solution I found needs to check if a collection “Contains” an entity from another place. But to do this, I need to convert the collection to a string of public ids, then use “Find” to check if contains.

When it gets to over 1000 characters, this check breaks silently. If it were to just print to the formula something different, it would also still break silently… Since no one is actively looking at this formula, its used for a different formula.

Still looking for a solution for this. But hopefully understanding the use case can help understand the solution.

For reference, this is the old solution:

If(
  Categories.Filter(
    Find(
      [Suppliers IDs],
      "|" + [This Source Document].Supplier.[Public Id] + "|"
    ) = 0
  ).Count() > 0,
  "| Contains category not present in supplier's relevant categories |",
  ""
)

Update:

Fixed by going the the other way. There are less categories linked to a supplier than suppliers linked to categories. So going the other way solves it.

There will be cases where this is impossible though, if both sides of the relation have many linked entities.

If I understand your use case, this sounds like a problem which shouldn’t be solved by making simple text fields accommodate more than 1000 characters, but by providing functions for set comparisons.
You need to know if the set of Categories for a Document is a subset of the set of Categories for the owning Supplier, right?

I’m not saying we’ll implement that feature any time soon, but I think it is worth thinking about what is the root cause problem to be solved.