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
xlate wild card?
System
Originally posted by Nora Katz
In an xlate, is there a way to use a wild card?
Currently, I have the following condition:
IF1(0).PV1.00133[0] eq =FAIR
I want to be able to apply the condition to include =FAIR2, =FAIR3, =FAIR4, =FAIR5 also
Find more posts tagged with
Clovertech
Comments
Keith McLeod
You may be better served by using something like using a pre tcl upoc on you r copy command:
set fairlist {FAIR FAIR1 FAIR2 FAIR3}
set xlateOutVals [lcontains $fairlist $xlateInVals]
This returns a 1 if contained in your list and 0 if not.
COPY 1(0).PV1.00133[0] -->
@flag
IF
@flag
eq ==1 Then
Hope this helps....
System
Originally posted by Anonymous
If you don't want to create a list of possible input values you could write the TCL snippet on a copy command....
Jim Kosloskey
Nora,
If the list is finite, another option is to use a Table Lookup.
Populate the Table with the valid values. Each Valid value returns a "Y" and the default (notfound) returns an "N". Have the Table Lookup populate a temp variable, then test the temp variable for Y or N and react accordingly.
If you need to use Tcl, rather than write a snippet which can only be used once, why not write an Xlate proc which is driven by argument(s) and does a string match wherin the components of the string match command are built from the argument(s). The arguments can be passed at the invocation of the proc or (I do this a lot) place the argument(s) in temp variable(s) and include them in the Action which invokes the proc. The proc then searches for the argument(s) in the xltInList and gets the argument(s) value from the corresponding xlateInVals.
This proc then can be used to look for any string matches in any Xlate related to any field or set of fields. Write it once use it many times.
Jim Kosloskey
System
Originally posted by Nora Katz
Thank you for all the responses! I think Karl's solution fits my situation the best.
Thanks again.