What should the return be from a Global Query if it fails to find
anything? I appear to be getting just a comma (",") back when the global
query cannot find anything. This is used to preselect a users value in a
picklist, but somehow the user has a value that does not exist in the
picklist.

var pickedUser = event.getCustomData();
if (pickedUser != '')
{
var joeSectionCode = IDVault.get(null, pickedUser,
'user','xxxxxSectionCode');
var joeSection = IDVault.globalQuery(null, "gSC",
{"xxxxxSectionCode":joeSectionCode});
form.alert("Section Code DN: " + joeSection);
if (joeSection != '')
{
field.select(joeSection);
}
else
{
form.showError("User has invalid Section Code");
}
}

pickedUser is the result of a DNQuery field, which fires this event in
onChange. The alert popup shows the DN value to be a single comma, as
does the error message that comes from field.select


--
tse7147
------------------------------------------------------------------------
tse7147's Profile: http://forums.novell.com/member.php?userid=4730
View this thread: http://forums.novell.com/showthread.php?t=394488