I am looking to take the first 10 characters instead of taking the whole cell data. What I am attempting to do is make a google form where the only submission field is an ID (Ex cfb1-12345, where cfb1 is the name of a tab in the sheet and cfb1-12345 is the full ID) so that my app script command can take the first x number of characters (in the examples case 4) and substitute it for the "records" sheet name. I am doing this now by having a separate field with the tab name the script specifically searches for.
var ss = SpreadsheetApp.getActiveSpreadsheet();
var formSht = ss.getSheetByName("Form");
var recordsSht = ss.getSheetByName(formSht.getRange("B4").getValue());
As shown here, it currently gets this value from cell B4, but I would like to be able to take the first X number of characters to fill this field to find the correct sheet tab. Any help is appreciated as I am quite the beginner.
Also, if anyone knows how to delay google forms responses from updating a spreadsheet to leave a 15-second interval between submissions, I would very much appreciate it!