Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Return Clone of message

Question
Rick Prichett · Feb 10, 2021

Return Clone of message

Hi everyone, I am trying to return a cloned version of my ADT that I have made changes to in a Business Process.  So far I have the following in my process.  

&sql(Select MemberId INTO :pMemberIDval from CDSM_MemberAPI.MemberInfo where MemDOB = :ptDOB and MemLname = :ptLname and MemFname = :ptFname)

set newrequest = pRequest.%ConstructClone()

set MemberIDPID4 = newrequest.SetValueAt(pMemberIDval, "PID:4.1")

The following does return the value I am populating the clone with to the log

  set newrequestPID4 = newrequest.GetValueAt("PID:4.1")
  $$$LOGINFO("newrequestPID4DB " _newrequestPID4)

So then I try to set the old request with the new but, I get nothing sent back out the trace.  Any Ideas where I am going wrong

set pRequest = newrequest

return newrequest

#InterSystems IRIS #InterSystems IRIS for Health
Product version: IRIS 2020.2

Source URL:https://community.intersystems.com/post/return-clone-message