Copy link to clipboard
Copied
Hello Smarter Than Me People... I have a field (ID Field) that will populate a 9 digit number. I need that number to populate into another field (New ID) without the first digit and last 2 digits. Any chance someone can help me out with the JavaScript for this?
As the custom calculation script of "New ID" enter the following:
var oldId = this.getField("ID Field").valueAsString;
if (oldId.length==9) event.value = oldId.substr(1,6);
else event.value = "";
Copy link to clipboard
Copied
As the custom calculation script of "New ID" enter the following:
var oldId = this.getField("ID Field").valueAsString;
if (oldId.length==9) event.value = oldId.substr(1,6);
else event.value = "";