June 21, 2024


Welcome to the core

First character from a string

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)


Copyright © All rights reserved. | Newsphere by AF themes.