C
CW
I have a function form Patrick Helastead's book for creating a Jscript
GUID.
In the OnLoad event of the form I put the following:
*******************************************************************************
var sGUID =
XDocument.DOM.selectSingleNode("/prurchaseRequest/my:sGuid");
if (sGUID != null)
{
XDocument.UI.Alert("null");
XDocument.DOM.selectSingleNode("/prurchaseRequest/my:sGuid").text =
getJsGuid();
}
else
XDocument.UI.Alert("Already a GUID");
*******************************************************************************
What's supposed to happen is if the sGUID field was previously given a
GUID when first filling out a form then it should return (for testing
purposes) "Already a GUID" and so it won't get overwritten. Otherwise,
if it's a new form it should return the text "null" (also for testing)
meaning it needs to run the getJsGuid() function.
Problem is every form I open retuns "null" when I know it's an update.
Meaning, my Jscript is very poor. I know I have the syntax wrong. tried
if(sGuid == null) as well. Neither work for me. Should I not be using
the null method? Am I not referring to sGUID correctly?
I'd appreciate any mentoring.
TX
GUID.
In the OnLoad event of the form I put the following:
*******************************************************************************
var sGUID =
XDocument.DOM.selectSingleNode("/prurchaseRequest/my:sGuid");
if (sGUID != null)
{
XDocument.UI.Alert("null");
XDocument.DOM.selectSingleNode("/prurchaseRequest/my:sGuid").text =
getJsGuid();
}
else
XDocument.UI.Alert("Already a GUID");
*******************************************************************************
What's supposed to happen is if the sGUID field was previously given a
GUID when first filling out a form then it should return (for testing
purposes) "Already a GUID" and so it won't get overwritten. Otherwise,
if it's a new form it should return the text "null" (also for testing)
meaning it needs to run the getJsGuid() function.
Problem is every form I open retuns "null" when I know it's an update.
Meaning, my Jscript is very poor. I know I have the syntax wrong. tried
if(sGuid == null) as well. Neither work for me. Should I not be using
the null method? Am I not referring to sGUID correctly?
I'd appreciate any mentoring.
TX