Design Studio - Drill down from another form

A client wanted to customize their AR09-Customer Group Address form so that they could add the AR10-Customer record at the same time. To do this we needed to add ten fields from AR10 onto the AR09 form.

Adding ten textbox fields to AR09 and then including an AGS call to add the AR10 record (after the AR09 Add button was clicked) wasn't too difficult. I didn't need to store those values, just have the textbox fields available on the form.

What made this interesting was the need to drill down on those new fields to look up the values available from the AR10 form. At first I 'borrowed' a technique I'd seen another consultant use - a custom search window with a DME call to return the values and allow the user to select the one they wanted.

This wasn't practical however when there were 1000's of records to page through so I decided to experiment and try to duplicate Lawson's drill down function on these textbox fields.

I discovered that if I added 'keynbr' and 'hsel' values to the Source code for each of the textbox fields that I could add Lawson's drill down function to them.

I created a QuickPaint of the AR10 form to look up the keynbr values for each of the fields I wanted to include on AR09 and then added those values to my textbox fields.

For example for the Default Code field I added keynbr="M4" & hsel="1" to the Source line for the "text29" textbox field and the drill down was now available. For each of the other fields I added the correct keynbr and the hsel="1" value as well.

I could now drill down for values from a different form than the one I was viewing.

A quick way to handle arrays in ProcessFlow

My client has an external system for their merit reviews and is passing a delimited file to Lawson for ProcessFlow to add the PA26 record and to kick off a Merit Personnel Action for the merit pay change.

The file looks something like this:
Record Type|Company|Employee|Scheduled Review Date|Actual Review Date|Review Score|Merit Increase Percent|Supervisor
A|100|53059|20080601|20080701|3|3.5|90006

I'm using the DataIterator node to read the lines from the file and then an Assign node to parse the line to different variables.

Within the Assign node the JavaScript Expression looks like this:
ary = new Array(); ary = NewMerit_outputData.split("|"); ary[0]
so the first variable gets the value "A"

The second variable gets the value of "100" with this JavaScript Expression:
ary = new Array(); ary = NewMerit_outputData.split("|"); ary[1]

NewMerit_outputData is the value of the line being read by the DataIterator.You notice this is basically rebuilding the array for each variable.

Here are the steps this expression takes:
Define the variable 'ary' as a new array
Read the value of the input line and split it into the array
Read the value of the array at position #

The last expression in the JavaScript Expression is what is assigned to the variable. I have in the past modified the pflow.js file to perform a similar function but that's not always practical so I decided to try this first.