Forum Replies Created
-
AuthorReplies
-
Hey Robert, thanks for your input… Everything works as you stated and actually, my VRL is set up that way… The problem is, if there is an unvalued field, the “” will not be valued… Here is an example: firstname: ch >”LEIALOHALA”< middleinit: ch >”M”< lastname: ch >”RUSSIANRUDOMETKIN”< blank: ch >< Address: ch >”123455 THIS IS A VERY LONG ADD”< firstname is a field length of 10 middleinit is a field length of 1 lastname is a field length of 20 blank is a field length of 2 (and in this example, field was not valued) address is a field length of 30 If anyone knows how to always output a “” (not “”””) if the field is unvalued, problem is solved… Thanks in advance, – Rob
Mike, it’s working like a charm… There was an extra } at the end of the frag… Gonna test some more but I think it’s working…. Thanks bro, I should have the BA requesting this change send you something…
Mike, same error: Command: hcixlttest epic_eq_sch_A01-test.xlt
FAILED
[0:TEST] Unable to load XLT ‘epic_eq_sch_A01-test.xlt’: keyed list entry must be a two element list, found “IN”
Mike, getting an error… keyed list entry must be a two element list, found “IN”
Tried enclosing the “[lindex $xlateInVals 0]” in [], same error:
set xlateOutVals
”]”]}
I tried something similar and couldn’t get it to work, if this works, the Prefix/Postfix of ” will not be required just this piece of tcl (Pre) in every copy statement and should work for valued and unvalued inbound fields…
Aloha,
– Rob
Jim, yes, i’ve tried the IF eq @ null copy =”” ->
works but works just the same as the tcl fragment Mike provided:
if {[cequal [lindex $xlateInVals 0] {}]} {set xlateOutVals
-
}.
If either of these are used, unvalued fields output “” but valued fields output without the “” since the Postfix/Prefix of ” had to be removed or when a field is unvalued and extra set of double quotes would be sent.
With the IF or tcl fragment, we’re back to square one but on the flip side… Meaning here’s the output:
31871805,20070320,””,””,””,””
Notice the first two fields are now without “”. The goal is to have every destination field be in “”, valued or not. If I leave the Prefix/Postfix with ” with either the IF or tcl fragment, output contains an extra set of “” for unvalued inbound fields:
“31871805”,”20070320″,””””,””””,””””,””””
What is required is:
“31871805”,”20070320″,””,””,””,””
Thanks again in advance!
P.S. Mike, Mahalo!
Used the following in a Pre Tcl: set xlateOutVals [format “%06s” $xlateInVals]
Works like a charm, zero fills when MRN is 6 or less, does nothing if 6 or more… Used “s” (string) instead of “d” as the “d” would output funky numbers if the MRN was already leading with zeros, see below…
hcitcl>set x 0012
hcitcl>set y [format “%06d” $x]
hcitcl>echo $y
000010
hcitcl>set x 0012
hcitcl>set y [format “%06s” $x]
hcitcl>echo $y
000012
-
AuthorReplies