Clovertech
› Clovertech Forums › Cloverleaf › How best to skip copying null subfields
Tagged: #SkipNullSubfields
I have the following field value: datax~~dataz
I would like to skip copying the NULL subfield to the outgoing message: datax~dataz
What is the best method to handle this?
Assuming Xlate. This is a repeating field.
Use a Field level ITERATE (lets say variable is %f1).
You will need your own variable for the OB since it will not match the number of iterations in the IB. Lets call that %f99.
At the beginning of the Xlate initialize your counter
COPY =0 to $%f99 <– that is a zero.
Inside the field level ITERATE:
If you have any questions or would like some assistance, email me.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Assuming you want to replace all ~~ with ~:
A simple solution would be a small Tcl proc in the route like:
run { keylget args MSGID mh msgset $mh [string map
[msgget $mh]] return “{CONTINUE $mh}” }
just a suggestion. Jim likes Xlate for everything while i generally like TCL 🙂
Thanks to both of you!