Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parse Data Flow

1 view
Skip to first unread message

Keith Taylor

unread,
Dec 16, 2009, 4:30:40 PM12/16/09
to
I'm new the product and have an assembly line with a JDBC connector
that returns records from an Oracle database. One of the fields
returned is the employee's supervisor name. Our HR folks decided to
populate this field "lastname, first name". I want to transform that
to "firstname lastname" before populating that in my domino
directory. I've been searching for an example out there that does
this without success. I imagine this is a gimme for the experts
here. I appreciate your feedback.

Eddie Hartman

unread,
Dec 17, 2009, 5:19:42 AM12/17/09
to
Hi Keith,

Here is an example advanced (JavaScript) map. Note that since the
order that Attributes in a Map are evaluated is NOT ordered, you
cannot base one mapping rule on the result of another in the same
Att Map.

Note also that I am addressing Attributes in "work". If this is to be
in an Input Map then you will use "conn" instead.

---
suprName = work.getString("SupervisorName"); // or whatever it's
called
parts = system.splitString(suprName, ",");
if (parts.length == 2) {
firstName = parts[1];
lastName = parts[0];
}
---

And then you return the value you need in the Attribute Map, or you
can write the values directly to your Entry of choice:

work.setAttribute("FirstName", firstName);
work.setAttribute("LastName", lastName);

Of course, if you programmatically add Attributes to the Work Entry,
then they won't show up in selection lists and drop-downs in the
Config Editor.

Hope this helps!
-Eddie

Keith Taylor

unread,
Dec 17, 2009, 9:55:57 AM12/17/09
to
Works flawlessly. Thank you for the spoon feed!

Eddie Hartman

unread,
Dec 18, 2009, 6:38:38 AM12/18/09
to
All long as your successful with TDI then there are spoons to spare :)

-Eddie

0 new messages