I am trying to do some mapping and instead of trying to use the “link” button which will create lines showing which field is getting mapped to which one I am using the approach given below.
Use the “set values” option and write the name of the field and select the “perform variable substitution” check box. So if I have to map the BIG-01 field of a X12-811 transaction to a field called Header-Date I write "%ST/BIG/BIG01% in the set values option.
This way I can keep the “pipeline” cleaner and also this aapproach allows concatenation of multiple fields without having to go for a Transformer.
I am sure someone must tried this earlier. So I just wanted to know the pros and cons of this approach. One of the problems I am facing right now is if the BIG-01 field is not present in the input X12 I get
“%ST/BIG/BIG01%” instead of “spaces” in the otuput.
Some thoughts will be much appreciated.
Shubhro,
Basically if you “perform variable substitution” like “%ST/BIG/BIG01%” and forexample this BIG01 field is not present then the output will show as it is “%ST/BIG/BIG01%” which you do setValue to the target field.So basically then what ever not mandatory fields then use the conditional mapping using Branch step and check for null and default set the variable substitution…I hope you understand the drawbacks and handling it carefully.
HTH,
RMG
Thanks RMG. That seems like a big overhead.
It would’ve been great if there was a way to specify default values inside the “set values” option.
Shubhro
set the default values much ahead in the process, so that they are changed during the process or retain the default values by the time you need to map is the only option.
I think you are taking this “clean pipeline” thing too seriously. You will soon realise that the lines in the map tells easily what the program is doing than opening the set to find out what varibles had been mapped
Thahir