go to post Tom Milligan · Jan 7, 2021 Hope this satisfies your need: I created a new class (called Test.Common.Utility) to do this. It performs a simple SQL select on a %Persistent table to find a specific value in a column. The code is as follows: Include EnsHL7 Class Test.Common.Utility Extends Ens.Rule.FunctionSet { ClassMethod CheckTable(pCSN As %String) As %Boolean { Set output = $$$NO &SQL(Declare C11 Cursor for select CSN into :tCSN from Test_Record.SampleTable where (CSN = :pCSN)) &SQL(Open C11) &SQL(Fetch C11) if SQLCODE = 0 { Set output = $$$YES } &SQL(Close C11) Quit output } } My rule to implement this function looks like: