cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue

Former Member
0 Kudos

Hi Friends,

I am having a problem in mapping to target files.

Here i am using useOneAsMany function to perform mapping at target structure.

purpose: I am having 2 fields on source header level

1. Emptied (Unique) and

2. Empiric. (populate on header and detail) its not unique

these 2 fields are Mapped to target filed Empties

These 2 fields are in 2 different node. And both nodes are at same level.

in the mapping i am also using Split [Value Change] to identify when duplicate EmpServiceNo. come and assign to correct EmpID

But it is not working in that way when duplicate EMpServiceNo. comes it is considering as 1 value and getting

error as: TooMany valuesin first queue in function useOneAsMany. it must have the same number of context as second queue.

Please advice.

Thanks

Vick

Accepted Solutions (0)

Answers (4)

Answers (4)

madanmohan_agrawal
Contributor
0 Kudos

Hi,

You can use the node function called useOneAsMany as described below:

The first input parameter expects the list of values that we want to propagate to the target message.

The second input parameter expects the number of iterations or how many times we want to replicate the value given in the first parameter.

The third input parameter is the list of context changes. Depending on this parameter the source values will be propagated to the target after every context change.

Note: For this function to work as expected, the first two parameters must contain the same number of contexts while the last two parameters must contain the same number of values.

Regards,

Madan Agrawal

Former Member
0 Kudos
Former Member
0 Kudos

EmpID -


|

|

EmpServiceNo -


> SplitByValue -


>

UseOneAsMany -


> SplitByValue -


> EmpHis

Each Value

EmpServiceNo---->SplitByValue -


>

My logic is as shown above.

I mean to say i have 2 values on source structure which are getting mapped to 1 filed at target structure.

Can CopyValue full fill my requirment?

Please advice.

Thanks

Vick

Former Member
0 Kudos

Actually your case is different. The funda of UseOneAsMany works when you want to map a field which comes only once but in your case your EMPID is coming many times so definetly neither UseOneAsMany nor CopyValue work here since number of queues will be different..

You have to write an UDF for this case...

Meanwhile if you can post your source and target structure with correct occurrence then I can try on my system. (sending screen shot of mapping will be best). May be you can send it to me ( see business card).

Former Member
0 Kudos

Hi,

can you give your source and target structure with sample data ...

Regards,

Prakasu.M

former_member206760
Active Contributor
0 Kudos

Vick,

UOM takes 3 queues as inputs..

here make sure that the number of contexts in the first and second queue are the same.

also number of values in the second and third queue are the same....else it will give an error

after the inputs are proper...an output queue will be geenrated which will have number of contexts as the 3rd queue,,,values according to the 1st queue and these values will be repeated according to the second Q