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
Cloverleaf
Field Edit
Jared Miller
Looking for a bit of help in character removal from the Name field. Would like to be able to remove all / . and - from that field.
I am currently using the following on TE-ST;BABY;1 BOY:
regsub -all {\|/|-|.} $name "" name
The problem is that it outputs TEST only so the first and middle names are gone. What am I doing wrong??
Find more posts tagged with
Clovertech
Comments
jcobane1
Jared,
Make sure that you are treating xlateInVals and xlateOutVals as lists in your code:
set name [lindex $xlateInVals 0]
regsub -all {\|/|-|.} $name "" name
set xlateOutVals
Hope this helps.Jim CobaneHenry Ford Health
Jared Miller
Here's what I have.....
set xlateOutVals ""
set name $xlateInVals
set name [lindex $xlateInVals 0]
regsub -all {\|/|-|.} $name "" name
set xlateOutVals
System
Originally posted by Anonymous
Jared,
When you use the field reference of a field that has subfields as the source of a translation action, the engine creates a list of all the subfields to put into xlateInVals. So, the name field doesn't contain "name;name;name" it contains "name name name". You can actually simplify your code to accomodate by not doing the lindex or passing the field back as a list.
Try this line only:
regsub -all {\|/|-|.} $xlateInVals "" xlateOutVals
Jared Miller
Ah, that makes sense Greg. That worked for me perfectly.
Thank you both for your assistance.