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
Referencing repeating field
jstafford
Hi all,
I've read through several posts addressing iteration questions and adding/removing repeating segments. I don't believe that any of them address the question that I have.
I am looking to iterate through the Consulting Physician field (PV1-8). In this field there can be multiple physicians, and each physician can have multiple physician IDs. For example, consulting physician 1 can have an internal ID, an external ID and a National Provider Index (NPI) ID. Consulting physician 2 can have the same information. I would like to strip out all non-NPI IDs for each physician, leaving only the NPIs for each physician.
|001^ONE^PHYSICIAN^Internal~010^ONE^PHYSICIAN^External~100^ONE^PHYSICIAN^NPI~002^TWO^PHYSICIAN^Internal~020^TWO^PHYSICIAN^External~200^TWO^PHYSICIAN^NPI|
I have the logic to iterate through the repeated fields and identify the NPI. My question is simple: can I manipulate a field iteration variable independently? Here is sample tcl code for within an xlate:
set npi "NPI"
set providerID $xlateInVals
if {[lsearch -regexp $providerID $npi]} {
set xlateOutVals $providerID
}
What I would like to do is have some sort of counter within the if statement that would be incremented, and use that in the Destination, i.e.
0(0).PV1.#7(
[counter]
)
. I want to have PV1.#7(0) be the first physician NPI, and PV1.#7(1) be the second. I do not know if I need to manually increment an iteration variable, or if I can just put a $physCnt in the destination; or if I'm making this unnecessarily complicated, overlooking a more simple solution.
As always, any insight is appreciated.
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
John,
I have done what I think you want to do without any Tcl. just Xlate Actions.
To the point you can manage your own ITERATion counter for the field level just as with any other ITERATE level (group, segment, etc.).
You CANNOT use anything besides a number or an ITERATE counter in a field address path - if you do it will be treated as zero thereby defeating the purpose.
If you would like to discuss in more depth, email me and I will discuss with you.
Russ Ross
I think if you come to understand how to use the $% syntax in an xlate the need for TCL procs will be reduced.
Overall our observation has been a wider range of people can support a xlate, while supporting TCL procs limits the support staff to more experienced people.
Here is a URL to show how others have used the $% syntax in a xlate to avoid writing TCL.
Using $% in Translate
This will give you some tangible examples to try and gain understanding of how $% syntax can be used for your own counters/pointers within an xlate without resorting to TCL procs.