Did you check the substring functionality?
Substring functionality: https://docs.mendix.com/refguide/string-function-calls/#5-substring
- Check length of string
- If > 2800 chars, take the substring 0 – 2800 into the first string (cutting it off)
- Take the remaining 2800 – (no length) into the second