Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Adding more fields
How can I add more fields at the end of a segment? I am trying to append pipes up to field 46 if fields 37-46 are blank for IN1. Any ideas? I am using tcl.
Hello Jawad,
I assume that you have broken the segment into a list of fields, based on the field separator. For example, with PV2
set PV2flds [split $seg $fldSep]
All you have to do is append empty fields to the list, up to the desired number. The code is like:
while {[llength $PV2flds] < 46} { lappend PV2flds {} }
The segment will now have the number of fields you want.
I hope this helps.
Take a look at our tps_pad_segment proc examples and other approaches at this URL:
<a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1330″ class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1330
Bob Richardson also posted a proc called tps_add_blank_fields at the URL above.
Russ Ross RussRoss318@gmail.com