[SOLVED (KIND OF)] Missing something obvious trying to do a lookup in a method
So calling this lookup manually from the console works as expected:
PHR>set key = "WMMC_IMM"
PHR>w ##class(Ens.Util.FunctionSet).Lookup("BlockFeed",key)
1
PHR>w ##class(Ens.Util.FunctionSet).Lookup("BlockFeed",key)
1
However, calling it from a method with some concatination to build the key is giving me problems:
{
set k = iParticipant _ "_" _ iFeed
w "Looking up " _ k,!
set x = ..Lookup("BlockFeed",k,"not found")
w "x = " _ x,!
}
PHR>w ##class("Custom.MHC.Common.Functions").canSendToState("WMMC","IMM")
Looking up WMMC_IMM
x = not found
Looking up WMMC_IMM
x = not found
I really don't understand. X should be 1