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
Cloverleaf
Send to Error DB from xlate
Paul Stein
Is there a way to send a message to the error database within an xlate?
If a certain condition isn't met, I would like it to error out.
From reading the documentation and this forum, I believe I may need to use the call action and then set the disposition to ERROR.
I have tried calling a tps proc from within the 'tcl' section but I cannot get that to work.
Any advice or help on proper syntax appreciated.
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
You can use the xmperror Tcl extension. Look up the syntax and options in the User Doc.
I like to have the option set to let the Xlate Action determine what happens to the message that way the same code can be used anywhere in any Xlate.
If you have more detailed questions let me know.
Paul Stein
Jim - I see the xpmerror now in User Doc and was able to get a message to the errorDB by using the 'CALL' Action, and then selecting 'Error' in the Error drop down.
That works, but is that what you meant by letting the Xlate Action determine what happens?
Also - not sure if i should use this in a pre-proc or jus the 'PROC' section, as if this condition occurs, i don't want it to go downstream at all or through the rest of the xlate
See attached.
xmperror.png
Jim Kosloskey
The syntax of xpmerror is:
xpmerror xpmid severity message
Where severity can be:
action
currdetail
alldetail
Action means use the Error Option in the Xlate Action which invoked the Tcl code with the xpmerror invocation. I do not recall what those options are on the Xlate Action Error pull-down but Error (which you have is one).
You have action which is what I prefer.
I rarely use embedded Tcl code in an Xlate but rather refer to a named procedure. I have a number of reasons why I prefer that but you need to do what works best in your environment.
Be aware this did not work is some releases of Cloverleaf. You could specify everything but the message did not go to the Error DB if I recall. I think all is well on 19.x and later.
Paul Stein
I understand now and agree, I have changed this to a named procedure rather than embedded now that i have this working.
Thanks Jim.