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
Numeric value
System
Originally posted by Tim Hallbauer
Is there a way to check if a field value is numeric withing an Xlate without calling out to a proc?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Tim,
I don't think so unless the intrinsic functions (which I have never used) have that function.
Jim Kosloskey
Dennis Pfeifer
Nothing native to the Xlate functions .. but ..
a one line tcl will do the trick ...
perform a copy ..
use the following (one line) in the pre proc.
set xlateOutVals [list [string is integer -strict [lindex $xlateInVals 0]]]
then .. set the output to
@isInteger
and use
@isInteger
in an Xlate If statment ...
If
@isInteger==1
Then it's numeric.
Dennis
P.S. (assuming your numbers aren't too big)
you may wish to remove the -strict so that empty strings are 'integers'
System
Originally posted by Tim Hallbauer
Thanks, that brings up another question. The field I am looking at is actually a sub-field in ADT transactions.
These fields would only be numeric in disaster situations like a terrorist incident or a really huge accident like a bus or plane crash.
Which method would be more efficient? Keep in mind that they want this installed and running ALL the time, not just when we have an incident
1. Calling a pre proc on the inbound side and splitting the message to get to the sub field, checking it to see if it's numeric, changing it to blank and then rebuilding the new message....or
2. Calling from within the Xlate as suggested but having to do it multiple times, possibly 9, not to mention changing every translate.