I copied John's javascript to convert a UID to a NTID and I am not getting the correct NTID. Instead of getting NT0000000e I am getting NT00000000. I hard code the UID in the variable rqryUsers_UID. Any thoughts on what I am doing wrong? His flow is pulling the UID from resources. Thank you.
I can't seem to insert the sciprt without getting a bunch of formating. Sorry/
if(rqryUsers_UID=="") {sNTID="";} else { var j=rqryUsers_UID; var hexchars = "0123456789abcdef"; var hv = ""; for (var i=0; i< 4; i++) { k = j & 15; hv = hexchars.charAt(k) + hv; j = j >> 4; } sNTID = "NT"; for (var x = hv.length; x < 8; x++) { sNTID = sNTID + "0" }; sNTID = sNTID + hv; }
if(rqryUsers_UID=="")
{sNTID="";}
else
{
var j=rqryUsers_UID;
var hexchars = "0123456789abcdef";
var hv = "";
for (var i=0; i< 4; i++)
k = j & 15;
hv = hexchars.charAt(k) + hv;
j = j >> 4;
}
sNTID = "NT";
for (var x = hv.length; x < 8; x++)
{ sNTID = sNTID + "0" };
sNTID = sNTID + hv;