E4X in XML node

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Steve11
Basic Member
Posts: 11
Basic Member
Does anyone have an example of using E4X in the xml node? I can't find any examples in the documentation.

This would be for building an XML document.

Any pointers greatly appreciated.

thanks,
Steve
Kevin Cubillas
Basic Member
Posts: 9
Basic Member
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Hi Steve,



Did you ever get an answer to this question or find a way to use the XML node to build?  I'm trying the same and am finding it to be a bit of a mystery.
Steve11
Basic Member
Posts: 11
Basic Member
Hi Kevin,

Never got a reply from this forum, but after much persistance I finally got an answer from Lawson.  As you may well know this is not documented other than to say E4X is supported.

Here's what I've done - in my PFI flow I've declared a javascript function in an assign node, called createJobGradeName (see below for code).  I then call createJobGradeName in my xml node, in the 'input' tab - see xml code below.

Hope this helps.

--Steve

/*
 * If Position.paygrade is 1, it’s a union position, if 0 it’s non-union.
 *
 * This function is used by the JobCodes and jobGrades xml and assign nodes.
 */

function createJobGradeName (stepandGradeSchedule, payGrade, salaryStructure, geographicDiff, salaryStructureGrade) {
 if (payGrade) {
  return (rtrim(stepandGradeSchedule) + '-' + payGrade);
 } else if (!payGrade) {
  return (salaryStructure.substring(0,4) + '-' + geographicDiff.replace(/^\s+|\s+$/g,"") + '-' + salaryStructureGrade);
 } else {
  return 'undefined';
 }
}

Here's the xml code found in the 'input' tab of my xml node, you can see where I call createJobGradeName and other functions.


    {jobCodesQuery_SHORTDESCRIPTION}
    {jobCodesQuery_SHORTDESCRIPTION}
    {jobCodesQuery_DESCRIPTION}
    {createJobGradeName (jobCodesQuery_STEPANDGRADESCHEDULE, jobCodesQuery_PAYGRADE, jobCodesQuery_SALARYSTRUCTURE, jobCodesQuery_GEOGRAPHICDIFFERENTIALCODE, jobCodesQuery_SALARYSTRUCTUREGRADE)}
    {createJecCatName (jobCodesQuery_JOBCOUNTRYATTRIBUTECODE) }
    {jobCodesQuery_POSITIONCATEGORY}
    {createFLSACodeName (jobCodesQuery_PAYMENTSCHEDULE)}
   
    1