on 02-27-2012 10:44 AM
Hi All,
I got a requirement as described below:
i have the requirement such that i need to create UDF based on Context , not on Value.
Suppose
i have 3 input fields , say VAR1, VAR2, VAR3.
loop should be base on VAR1 field
and values in queues for these fields be,
VAR1:(context as RecordData)
15-8A
16-9A
CC(context change)
17-10A
18-11A
CC(context change)
19-12A
20-13A
21-14A
VAR2:(context as RecordData)
in
out
CC(context change)
in
out
CC(context change)
in
out
in
VAR3:(context as RecordData)
10
CC(context change)
11
12
CC(context change)
13
14
But in the third field VAR3 queue , i am getting one value missing in first context and third context
and need to concatenate the missing value with SPACE (" ") as shown below.
My output should be as:
Target filed : OUT
15-8A; in;SPACE
16-9A; out; 10
CC(context change)
17-10A; in; 11
18-11A; out; 12
CC(context change)
19-12A; in;13
20-13A; out;SPACE
21-14A; in;14
So how to determine the SPACE when there is missing value in context.
Thanks in Advance
Sai_SHA
Hello,
Have you tried using mapWithDefault before passing to UDF?
VAR3 -> mapWithDefault -> OutPut
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Thanks for the reply,
I have the values in VAR3 queue but in first and third context i am missing one value.
if i am not wrong MapwithDefault is used when there is no value at all form the source field.
if the queue VAR3 has SUPPRESS value in context then i can go for MapWithDefault
but it is not the case here.
but i am getting values 10 , 13 ,14 in first and third contexts.
VAR3:(context as RecordData)
missing value
10
CC(context change)
11
12
CC(context change)
13
missing value
14
Thanks
Sai_SHA
Edited by: sai_SHA on Feb 27, 2012 5:19 PM
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.