prashanth ponugoti · Sep 28

what it will return if key not found in lookup table

Hi Firneds

I have few odscodes in Lookup table named "AllowLT" .

Now I need to continue if I found value in lookup table or stop it. For that I have colleting the value form lookup table for input HL7 message OBR:21  value.

I know if found in lookup table it will return 1 or 0 . If not found what it will return below line? to return 0 in case , given key not available in lookup table , what I need to write?

Set isallowed = ##CLASS(Ens.Util.FunctionSet).Lookup("AllowLT", pRequest.GetValueAt("OBR:21"))

if isallowed=1






Product version: IRIS 2021.2
0 84
Discussion (3)1
Log in or sign up to continue

That should be 3, not 4, for the last parameter, so:

##CLASS(Ens.Util.FunctionSet).Lookup("AllowLT", pRequest.GetValueAt("OBR:21"),"0",3)

There are 4 options on how to handle the default and the values are 0 to 3.

3 being return the default if either table or value is empty.