With some help we created a function to loop through a repeating field and verify values against a single string, and a variation against a Lookup Table...

ClassMethod DoesSingleValueExistRepeatingSegmentFields(pHL7Msg As EnsLib.HL7.Message, pSegment As %String, pField As %String, pSubField As %String, pInputValue As %String) As %Boolean

{

   #dim tSeg as EnsLib.HL7.Segment

   set tSegCount = pHL7Msg.SegCountGet()

   set i = 1

   set j = 1

   Set tFound = 0

   //get new values

   set tval=""

   while ((i <= tSegCount) && (tval="")) {

     set tSeg = pHL7Msg.GetSegmentAt(i)

     if (tSeg.Name = pSegment) {

      set pField2 = pField_"(*)"

      set tRepCount = tSeg.GetValueAt(pField2)

      while ((j <= tRepCount) && (tval="")) {

        set tID = tSeg.GetValueAt(pField_"("_j_")"_"."_pSubField)

        if (pInputValue = tID) {

         set tval = 1

        }

       set j = j + 1

      }

     }

     set i = i + 1

   }

   if (tval '= "")

   {

      Q 1

   }

   quit 0

}

I am wondering if the Query against LDAP is taking too long and timing out in a response, even though he is getting an Invalid Username/password error returned but this happens when he tries to sign in from VS Code using /api/atelier. I tried increasing the timeout, but it doesn't seem to make a difference. I tried adjusting the Base DN search, and the Nested Group search to no avail.

Do you have to use Result Set, why not use EnsLib.SQL.Snapshot as a context variable, and using a While loop call the Snapshot.Next() to loop through the results to do what you need to do?

For example.... I make calls to a Stored Procedure then use the Snapshot that is returned to fill in other properties that I need...

<call name='Ref_PrivilegeForm' target='CREDVerityMFNCPDWriteDev' async='0' xpos='200' ypos='350' >

<annotation><![CDATA[Execute stored procedure to insert/update the PrivilegeForm value sent by Verity into the Ref_PrivilegeForm table, and return the identity key]]></annotation>

<request type='osuwmc.Credentialing.DataStructures.RefPrivilegeForm' >

<assign property="callrequest" value="context.RefPrivilegeForm" action="set" />

</request>

<response type='EnsLib.SQL.Snapshot' >

<assign property="context.Snapshot" value="callresponse" action="set" />

</response>

</call>

<while name='Snapshot.Next()' condition='context.Snapshot.Next()' xpos='200' ypos='450' xend='200' yend='350' >

<assign name="PrivilegeFormKey" property="context.PrivilegeFormKey" value="context.Snapshot.Get(&quot;PrivilegeFormKey&quot;)" action="set" xpos='200' ypos='250' >

<annotation><![CDATA[aka Index]]></annotation>

</assign>

</while>

<assign name="reset Snapshot" property="context.Snapshot" value="&quot;&quot;" action="set" xpos='200' ypos='550' />