Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

concatenating three fields into one

Avatar

Former Community Member
Hi all of you,



I do have a problem with coding correctly a form I am designing using the Adobe Livecycle . In one of the field, there is an underlying field that when you exit the first name field or the Middle Initial field or the last name, it should all pass the respective values to the underlying field which becomes visible on printout. I do have this code I wrote on the exit event, but do not understand why it it not working. Please, can anyone tell me why it is not working or help me out on a better way of making it work.



xfa.host.messageBox("Check this");

if (EMPFNAME.rawValue <> " " ){

xfa.host.messageBox("EMPFNAME");

EMPNAME.rawValue = String(EMPFNAME.rawValue) + " ";

if (EMPFNAME.rawValue <> " " )&&(EMPMI.rawValue <> " "){

EMPNAME.rawValue = String(EMPFNAME.rawValue) + " " + String(EMPMI.rawValue) + ".";

var s = EMPMI.rawValue;

EMPMI.rawValue = s.toUpperCase();

}

if (EMPFNAME.rawValue <> " " )&&(EMPMI.rawValue <> " ")&&(EMPLNAME.rawValue <> " "){

EMPNAME.rawValue = String(EMPFNAME.rawValue) + " " + String(EMPMI.rawValue) + "." + " " + String(EMPLNAME.rawValue);

var s = EMPMI.rawValue;

EMPMI.rawValue = s.toUpperCase();

}



}



Thanks



Lucky P
0 Replies