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
How to do IF / COPY
System
Originally posted by Anna Fleeger
I am trying to replace the code in OBR #4 [0] based on the text in OBR #4 [1]
If the text is PREPARE CONVALESCENT PLASMA then I need the first field to be CON
Find more posts tagged with
Clovertech
Comments
Rob Abbott
Try this:
IF OBR#4.[0] eq =PREPARE COONVALESCENT PLASMA
COPY =CON --> OBR#4.[0]
Vince Angulo
This can be troublesome because PREPARE CONVALESCENT PLASMA is a string with spaces...
Create a variable with your string:
COPY =PREPARE CONVALESCENT PLASMA ->
@TestString
Create a variable with OBR-4.1:
COPY OBR-4.1 ->
@OBRText
If
@OBRText
eq
@TestString
THEN COPY OBR-4.0 -> OBR-4.1
Jim Kosloskey
Is that the only value in OBR-4.2 that need to have something in OBR-4.1?
Xlate I am assuming.
If that is the only value then a simple IF Action:
IF OBR-4.2 (use appropriate address path here) eq =PREPARE CONVALESCENT PLASMA
COPY =CON to OBR-4.1 (use appropriate address path here).
On some releases of Cloverleaf you may need to COPY the value PREPARE CONVALESCENT PLASMA to a temp variable first and then do the IF against the temp variable.
If there could many relationships of text in OBR-4.2 to a value or set of values in OBR-4.1 then a Table would be the best bet. No IF needed then just a TABLE Action.
System
Originally posted by Anna Fleeger
Thanks to everyone to responded to my question.
We went with Jim's suggestion of going with a table because there could be additional codes that will need to be converted. Here are the steps we took to determine if the result text was what we were looking for, and if so, to update the result code:
created a table with the result text requiring a special code in the IN side and the desired replacement result code in the OUT side. The Use Default Value is selected, and allowed to stay Null.
in the xlt enter TABLE operation, use text in OBR.4[1] as the Source, with the new table, write the Destination value to a variable
using IF operation, if the variable value is NOT null, use the variable as the Source, and COPY the value to the OBR#4[0]
Many thanks to Jim for his additional support!