|
|
Rank: Advanced Member
Joined: 11/2/2009 Posts: 38 Location: cinti, Ohio
|
I'm still learning the MapForce tool, but I've been unable to find a way to provide what I need. All of the lookup examples I've seen share the fact that the function has to know the target of its results, because it has to place the result in a structure.
I'm really trying to make a higher performance version of a value-map, where I put criteria in, and get a string value out, that I can reuse and place the result on any target.
There are several nice examples of ways to do the lookup I want,(find the value in a conversion table), but I can't seem to find a way to return a simple string from my User Function. (so I can reuse it)
ejohann attached the following image(s):

|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
The solution in you case is to connect pplusFieldValue to the "table" input of WHERE component. In this case the "result" of WHERE is this field value.
|
|
Rank: Advanced Member
Joined: 11/2/2009 Posts: 38 Location: cinti, Ohio
|
Thank you for the quick reply. Let me be sure I understand it.
Are you saying I can replace the table connected to the sql-where with just the field I want to return? Does the WHERE process infer the table to filter from the container of the field connected to the Table connector?
Is there any reference information on some of these functions? It would be very helpful to understand the various ways powerful functions like this can be used.
Eric
|
|
Rank: Advanced Member
Joined: 11/2/2009 Posts: 38 Location: cinti, Ohio
|
Your answer worked great! Then (of course) my requirements changed.
I'm still in a lookup function, but I need to return 2 bits of information, not just one. The documentation shows selecting a table row, then taking the columns needed and map them to the children in the target. In my function, I have no such structure. (see image)
Suggestions?
ejohann attached the following image(s):

|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
A function must have a single output which can be any tree too. Just use one of the existing trees or create one just for this function (I would do this with a CSV output, as it allows to easily add columns - in this case output values).
|
|
|
guest |