cancel
Showing results for 
Search instead for 
Did you mean: 

different contexts to different targets

0 Kudos

Hi all,

Does anyone know how to put the different values of a context to different target fields?

Example:

<filed1> A

<filed1> B

<filed1> C

<filed1> D

Target fields

<target1> A

<target2> B

<target3> C

<target4> D

Thanks all!

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Are the number of contexts in field1 constant?


field1 -> copyValue[0] -> target1
field1 -> copyValue[1] -> target2
field1 -> copyValue[2] -> target3
field1 -> copyValue[3] -> target4

Do targets 1-4 have the same name? Because it might just be context manipulation.

Hope this helps,

Mark

0 Kudos

Hi Mark,

Are the number of contexts in field1 constant?

---> No, sad to say. It can be 0, 1, 2, 3 and 4 fields. min of 0 max of 4..

Do targets 1-4 have the same name? Because it might just be context manipulation

---> They have different names. The 4 target fields are different..

Former Member
0 Kudos

Hi,

And do we have that ?

<target1> receices always the 1st value of <Field1>

<target2> receices always the 2nd value of <Field1>... if <field1> has a 2nd value ?

<target3> receices always the 3rd value of <Field1> ... if <field1> has a 3rd value ?

<target4> receices always the 4th value of <Field1> ... if <field1> has a 4th value ?

If yes, you can easily acheive it by writing a UdF, as your number of target is limited to 4 fields. (so no dynamic)

Mickael

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can try this logic,

for target1


field1 -> removeContext -> count -> greater -------------------------> ifWithoutElse -> removeContext -> target1
                     constant: 0 -> /  field1 -> removeContext -> copyValue[0] -> /

for target2


field1 -> removeContext -> count -> greater -------------------------> ifWithoutElse -> removeContext -> target2
                     constant: 1 -> /  field1 -> removeContext -> copyValue[1] -> /

for target3


field1 -> removeContext -> count -> greater -------------------------> ifWithoutElse -> removeContext -> target3
                     constant: 2 -> /  field1 -> removeContext -> copyValue[2] -> /

for target4


field1 -> removeContext -> count -> greater -------------------------> ifWithoutElse -> removeContext -> target4
                     constant: 3 -> /  field1 -> removeContext -> copyValue[3] -> /

Hope this helps,

Mark

Edited by: Mark Dihiansan on Nov 8, 2011 2:51 PM

Answers (0)