ION Document Flow

A Document Flow moves the Business Object Document (BOD) from one application to another, like the Security User Master BOD from IFS to Landmark multi-Tenant, Landmark single-Tenant, Mongoose, Lawson LSF, etc.

Each of these applications had its own SUM BOD Document Flow created as the applications were rolled out, and after we implemented EAM we followed the same pattern and created a new Document Flow, this one with a Mapping included.

So, each application we were sending the SUM BOD to had their own separate Document Flow to process the BOD and so, we thought, the Mapping from one wouldn’t impact the others. That’s not what we discovered.

We started getting Error BODs because the Mapping we applied to the EAM Document Flow caused a problem with the other systems that couldn’t accept the change to the BOD. It was like the different Document Flows processed the BOD in a series and that’s what it looked like in One View when we reviewed the processing.

How then could we apply the Mapping for EAM without impacting the other applications? It sounds simple now, but we tried a few different things before we hit upon the answer. We needed to create one Document Flow for all of the applications together.

One Document Flow to move the BOD from IFS to all of the receiving applications, with the Mapping for EAM in a parallel stream within the Document Flow.

Not just answers, providing solutions

The DataIterator

I like the DataIterator, but it isn't always the best solution to use for iteration of data. To explain I will tell about a recent flow I needed to develop and the solution I came up with, part of which used the DI.

My client receives an item master file from GHX and they use it to update the Item Master (IC11) & Vendor Item (PO13) records, to update unreleased Requition line items (RQ10), and to update pending PO Interface line items (PO23).

We will update the description values, manufacture values, and vendor item number values for the items in the file. We are also updating the GL account on IC11 and the Purchasing Major and Minor Class values from another file.

The value joining the two files is the UNSPSC code value.

I used a File Access to load each file, and the first was a combination of line and tab separated values. Each item was separated by line but each data element of the item was separated by tab stops. It was recommended that I use a DataIterator to first parse the lines and then to parse the tab separated data elements (basically a nested pair of DI's).

If you're familiar with this, it works pretty much like a query to cycle through the data elements and I thought that was a bit clumsy. 

My solution? I used an Assign node - JavaScript Expression and treated the file's data like an array. It performed the exact same function, but was much faster. I first 'extracted' the data I needed and assigned it to a new variable (line and CSV data separated).

Remember, I had two files that I need to merge via UNSPSC codes before I could begin my updates in Lawson. One file had this value separated by the 4 parts while the other lumped them together. 

The 2nd file contained 49,023 lines of data and the thought of using the DataIterator to read through all of those records concerned me. I thought of the amount of time required and again decided to use the Assign - JavaScript Expression.

This process, reading through 49k lines, parsing and rewriting the output to a new variable took less than 4 minutes. That comes out to better than 200 lines of data per second. Remember, it had to iterate each record by line and then each line by its data element.

Now that I had two sets of records, ready to be merged (by UNSPSC value) I used another JavaScript Expression to compare, match and write the merged data into another new variable.

Then for each set of Lawson records to be updated I used a SQL query to retrieve my item records and wrote that to a new variable, which I then compared to the merged data to determine which had to be updated.

You guessed it, with an Assign - JavaScript Expression. So if the item description was different, or the vendor item, manufacturer info, etc. was different then I wrote which records required updating to a variable.

Now I had, for example, a list of items that needed updates done on IC11 in Lawson. That's where the DataIterator now came into play. I could iterate this final output by line and then create a transaction expression to use in an AGS update.

Using the DI at this point made sense since I needed to perform an update after each item record was parsed out. Within the DI loop was an Assign and a Lawson Transaction. 

My conclusion? If you need to perform a function while looping through the data, use a DataIterator. If not then using a JavaScript Expression is much more efficient.

Updating a DME string used by MS Add-Ins

If you create a DME (Query) in MS Add-Ins with a status field and want to convert the numeric value to the actual description, save your DME file and then open it in TextPad (or Notepad, etc.) and edit the .dme file to add ,xlt to the status field. Save it and when you open it within MS Add-Ins and run it, the results will come back with the status description.
DEVEL2B~PO~PORECEIVE~2~1~600~Created with Query Wizard 10.0.109~0~1~0~F
LWSN104~~COMPANY~2~~PO-NUMBER~0~~REC-NUMBER~2~~STATUS,xlt~2~
NEW~~0
Sheet1~A~1~TRUE~FALSE~FALSE
 Before:
CO         PO-NUMBER
STATUS
6000         60000000000301139         9
6000         60000000000300138         9
6000         60000000000274137         1
6000         60000000000275136         1
 
After:
COPO-NUMBER
 
600060000000000301139Archived / Closed
600060000000000300138Archived / Closed
600060000000000274137Released
600060000000000275136Released
 

ProcessFlow - Ad Hoc Multiple Approvers

I'm having to design a new flow which will require that multiple approvers, all with different category filter values, approve the WorkUnit at the same time.

What makes it even more interesting is the UserAction setting for the percentage of recipients taking the same action. We are setting primary and backup approvers and PFI calculates the number of users by how many could take action, not on how many approvals are required by category filter.

In other words, if you have 3 departments needing to approve the UserAction but you have 2 of these departments with a primary and backup approver, the system calculates that 5 users could take action so you have to base your percentage of recipients on that value.

Now as to how to dynamically set your UserAction to different approvers with different category filter values:

My flow will figure out all of the category filter values it needs to take into account (for example, multiple departments) with a Query and then update the oCatValue variable with a unique key value (see below) and then add that category filter value to each approver's User Task Category Definition prior to entering the UserAction.

After all required users have taken their action, this dynamic category filter value will be deleted from each approver.

A simple function to create a dynamic category filter value:
The following JavaScript creates a 12 digit number (milliseconds since 1/1/1970) and is unique per second.
// var d=new Date();
// oCatValue=d.getTime()

Design Studio - getting information after an Inquire

I think I've mentioned in the past some frustration that a form will return the "Inquiry Complete" message before that actual form field values update and that this is a problem when you want to capture the field values after an inquire is completed (using lawForm.getFormValue).

What I realized is that although the form field values don't update quickly enough, you can retrieve the field data values right away.

So instead of trying to capture the form value, use the lawForm.getDataValue function instead when an Inquire is done and you will be able to capture what you want.

Using Design Studio to burst Strategic Ledger fields

I was asked the other day if I could present four different fields for the one SL field currently on RQ10 so that the user wouldn't have to add the values as comma seperated records.

Since I love a challenge...

I deleted the one SL field and added 4 labels and 4 text fields to the form at the line level. Each label listed what the field value should be.

When the user Inquires on the form my script retrieves the Segment Block value for each line presented and puts that into an array (by line) and then splits the array and assigns each value into the correct text field.

When the user Adds/Changes on the form my script takes the 4 text field values (by line), puts them into one comma seperated variable and then assigns that to the Segment Block value in the OnBeforeTransaction function.

The user was very happy with the ease of use that this provided to them and so, of course, asked for the ability to select Define on each of the 4 fields.

In order to add Define to a text field that you've added to a form, you must go into the Source tab, find the lines for each field and add hdef="1" and deftkn="SL40.6" to each of the 4 text field references. Now when the user right clicks on your text field, they get the option to select Define.

I've mentioned it in the past, but it bears repeating that if you add a text field to the detail line section of your form then you also have to update the field so that the system knows to track it by row. In this case you would find the line in the Source and update the field number from nbr="_f730" to nbr="_f730r0".

There you go. A simple solution that makes data entry much easier for clients using the Strategic Ledger system.