Split String to Extract First Word from Text field
I would like to split a text field, named Client1, to extract just the first word using a space as the delimiter.
Here is what I've put together from reasearch, but it isn't working when placed as a custom calculation script in a read only text field:
var str1 = this.getField("Client1").value;
var res1 = str1.split(" ", 1);
event.value = res1
I think I'm missing something in going from the array produced by var res1 to the desired event.value for the field. I appreciate a point in the right direction - thanks!
