First character from a string
To capture the first value of a string in a Confirmit script node, use the script below.
var str : String = f(“qnr_new_details_1“).get();
var firstLetter : String = str.charAt(0);
var suranmeinital = (f(‘qnr_new_details_2‘) + “, ” + firstLetter);
This is taking 2 values (First name and surname) and making the out to be “Surname, Firstname Inital” “Smith, B” / “Miller, C” (Chris Miller)