"08363-G-5109-DWG-R-00001_A.pdf" with a varying number of characters before the underscore, but always the same after the underscore. In the first text box I need
08363-G-5109-DWG-R-00001 which I get with
event.value = event.source.source.documentFileName.slice(0,-6);
Any assistance would be greatly appreciated!
var str = event.source.source.documentfilename;
var strt = str.lastindexof("_");
var end = str.lastindexof(".");
event.value = str.substring(strt,end);