-1

I am concatenating column cells with a script' some of the concatenated strings for some cells after concatenation are longer than 50,000 characters.

When I try to postback data to the sheet, I get

Your input contains more than the maximum of 50000 characters in a single cell.

Is there a way to flag this error?

I want to output "Too many words!" for those cells when I run into them.

Rubén
  • 34,714
  • 9
  • 70
  • 166
xyz333
  • 679
  • 6
  • 14

1 Answers1

2

You should craft your own validation, i.e. by using an if statement, then you might use a Ui.alert() or Ui.showDialog() or a throw statement

Example

if(value.length > 50E3){
  throw new Error("Too many words!")
} else {
  // put here the what should be done if length is less than 50,000
}

Related

Rubén
  • 34,714
  • 9
  • 70
  • 166