- This topic has 11 replies, 5 voices, and was last updated 15 years, 7 months ago by .
-
Topic
-
I have a pre-proc in an Xlate (pipe delimited VRL input and comma delimited VRL output), which removes the comma from the Address1 field of a physician’s office address. When I run my pre-proc with echo’s in it I get the desired output of removing the comma, but when it write to the CSV file it truncates the field to have only street number in Address1 field. For example,
Current format of Address1:
111 Michigan Ave, NW
Correct Format is
111 Michigan Ave NW
But csv file has only
111 in the Address1 field.
I have spent way too much time on trying to fix it. I would appreciate any help! Thanks!
Here is my tcl xlt code that I call while copying Address1 field.
proc xlt_rmv_comma_Addr1 {} {
upvar xlateId xlateId
xlateInList xlateInList
xlateInTypes xlateInTypes
xlateInVals xlateInVals
xlateOutList xlateOutList
xlateOutTypes xlateOutTypes
xlateOutVals xlateOutVals
set xlateOutVals ” ”
set Addr1 ” ”
assign_list $xlateInVals Addr1
if [regexp {[,]} $Addr1] {
regsub -all {,} $Addr1 {} Addr1
set xlateOutVals $Addr1
echo “Corrected Address:” $xlateOutVals
} else {
set xlateOutVals $Addr1
}
}
- The forum ‘Cloverleaf’ is closed to new topics and replies.