Want to convert a TEXT FIELD PROPERTY, with a FORMAT category of SPECIAL - Phone Number, so that each digit can be moved to a separate field.
//I tried sending the information to an array, but null characters are returned
//sample of what I tried, where 'phone number' was assigned a value of '2345678901'
var homephoneno = this.getField("phone number").value;
//below, displays the number '2345678901'
app.alert("homephoneno --> " + homephoneno,1);
//below, returns a null character - I want individual numbers and below am trying to strip the number '2'
Thanks, try67. Appears this is what I was searching for.
You original code can work if you make a small change by getting the field value using the valueAsString property, as opposed to the value property. When you use the value property and the value is numeric, a number is returned, as opposed to a string. The notation you used will work with a string, but not a number, so the fix is to ensure you're working with a string.