Published on InterSystems Developer Community (https://community.intersystems.com)

Home > BPL - Foreach IF statement

Question
Jack Mears · Nov 26, 2018

BPL - Foreach IF statement

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation. 

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

Cheers

#Beginner #Caché #Business Process (BPL)

Source URL:https://community.intersystems.com/post/bpl-foreach-if-statement