on 11-18-2010 6:40 AM
Hi Mapping experts,
my scenario is receiver FILE (fixed length)
so if a validation applied on a target field returns false then I need to pass the spaces having the number of characters defined for that field
example
targetField length = 8
using "IF" function to perform validation, if validation is true THEN = FIELD
if validation is false ELSE = "________" (underscore to represent 8 spaces)
the problem is the validation is of multiple occurences in one queue and if the "true" statement is on the 6th row, I get _________ which is the value of the 1st row (which is correct because rows 1 to 5 are all false therefore having the value of ELSE which is _______ mapped to it)
How can I get the value of the TRUE row regardless of what row it is located?
e.g. IF = input is 5 rows of validation, TRUE is in the 3rd row, i will get the 3rd row value
IF = input is 5 rows of validation, NO TRUE Value, return 8 spaces
right now when i Display Queue values are
iF:in0 iF:in1 iF:in2 iF:out
1111 false [_________] [_________]
2222 false [_________]
3333 true 3333
4444 false [_________]
5555 false [_________]
In above Queue i only get the value of the 1st row which is ________ --> because my target field occurrences definition in Data Type is 0....1
if I change Data Type occurrences to 1...unbounded I get 5 target fields generated --> WRONG because target file is fixed field, so only one occurence of that target field is required
> so if a validation applied on a target field returns false then I need to pass the spaces having the number of characters defined for that field
This not necessary. It is fine just to create an empty node.
Use function "mapwithdefault" to create an empty node. Instead of "if" use "ifwithoutelse"
so you would have:
... - ifwithoutelse - mapwithdefault - target
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you give me the idea of what validation are you using so that anyone can help you with the UDF straightaway
because you need to have a UDf in place which will iterate the number of times the field occurs and then it will check the entire queue first ,where validation is true and only at the instant it will return the value
if the entire queue is value it will return the 8 underscores
I hope this is what you wanted
regards
ninad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.