infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Tcl Library
Pulling multiple Dr# from same field
Kevin Crist
I am trying to pull the dr numbers from all dr fields and and comparing them to a table to kill or continue. How do i pull the number from a dr field if their are multiple drs seperated by the ~. Below is my code.
switch -exact [lindex $fldList 0] {
PD1 {
if { [llength $fldList] >= [expr $PrimaryPos + 1] } {
set repList [split [lindex $fldList $PrimaryPos] $repSep]
set value [split [lindex $repList 0] $subSep]
set PrimaryPosVal [tbllookup $table $PrimaryPos]
But when i do the echo on my replist i get 9999^BILL^COSBY^^^MD 1111^MARLEY^BOB^^^MD, which is want (i think), so when i split it out again i get the 9999 BILL COSBY {} {} MD, but not the second dr. How would i get the second dr and then pull out the number? Any help is appreciated.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Jim Levy
Hi Kevin,
Here's what I came up with. I didn't test it, but it should be close to right.
switch -exact [lindex $fldList 0] {
PD1 {
if { [llength $fldList] >= [expr $PrimaryPos + 1] } {
set repList [split [lindex $fldList $PrimaryPos] $repSep]
foreach rep $repList {
set value [lindex [split $rep $subSep] 0]
set PrimaryPosVal[tbllookup $table $value]
# What you do next depends on whether you want to kill
# the doc out of the list or kill/continue the record.
}
I am wondering why you are calling your value returned from the table "PrimaryPosVal".
If you provide more information I'll be happy to try to help.
Jim