Here is the function I'm writing:
ClassMethod getParticipant(iSendingFacility As %String) As %String [ Final ]
{
set a = $PIECE(iSendingFacility,"^",1)
set b = $PIECE(iSendingFacility,"^",2)
set sc1 = Lookup("ParticipantCodeMap",a)
if sc1 = "" {
set sc1 = Lookup("ParticipantCodeMap",b)
}
q sc1
}
For some reason when I try to run it I get the following error:
set sc1 = Lookup("ParticipantCodeMap",a)
^
<UNDEFINED>
I tried adding the the default parameter in case it's not finding it but it didn't help. What am I missing?
