on 10-24-2014 10:25 AM
Hi there experts!
I have an interface that reads a file that is formed by a number of items like <item> fields... </item>
The first item in the file is one that is 'self explanatory' and has the names of the fields, not the actual info. I need to skip that item (always placed first in the file) and cannot skip it via Content Conversion since it's a receiver channel.
If I put an if like if <item> field value not equals real_value do not match to target the mapping raises an error. How could I achieve this functionality? any hint?
Thanks in advance!
cheers,
Edu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Iñaki,
I've developed the mapping and it works, but I have another problem now. Before this change, the target node would not generate unless some field have the EUR constant in it. Now, the mapping skips the first record, but generates target sources whether it has the EUR constant OR not. See attached the mapping:
cheers,
Edu
Hi Eduardo,
Try replacing the "=" function by equalsS (for String -> comparison to "EUR" constant) and equalsA (for Arithmetic values). The comparison functions sometimes give surprising results
Moreover, if this is something you move from items level to header level, you might have to add one more RemoveContexts function right before the target field.
Regards,
Grzegorz
Hi Eduardo,
I assume your first row contains the value "EUR"? In this case it is really a matter of context changes. The mapping probably takes the first value in the queue and applies it to all. Try right-clicking on the if-conditions and display the queues like Inaki did. That should give you a hint.
Regards,
Jörg
Hi Jörg,
that's exactly what's happening, the mapping skips the first record an not generates the target node, but then it generates all the rest of <row> as targets, not just the EUR condition...
Since the mapping's been already working, I've just added the new if Iñaki told me in order to not generating the first row, I assumed it would'nt change the rest of rows behavior, Am I wrong?
cheers,
Edu
Hello Eduardo,
if FCC is not an option, have you considered using the counter functionality in the mapping? If you know you always need to skip the first item, you could implement a check for the first element.
Regards,
Jörg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.