go to post Michael Wood · Jan 15 Worked like a charm. Thank you! set tQuery="SELECT ProvId, AllwOpenSchYN, IsAllwSchedYN FROM "_context.EpicClaritySerMycTable_" WHERE ProvId='"_context.ProvId_"' AND Market='"_context.Market_"'" set tStatement = ##class(%SQL.Statement).%New() set qStatus = tStatement.%Prepare(tQuery) set rset = tStatement.%Execute() do rset.%Next() if rset.%SQLCODE<0 { $$$TRACE("SQL Query ["_tQuery_"] FAILED") } else { set tAllwOpenSchYN = rset.AllwOpenSchYN set tIsAllwSchedYN = rset.IsAllwSchedYN set tProvId = rset.ProvId }
go to post Michael Wood · Jul 10, 2024 Could use a compact view. There is no disabled shading. Disabled shading was super helpful to quickly know which rules are enabled/disabled.
go to post Michael Wood · Jun 17, 2024 My custom service pulls from a cache table. I have the fields defined as string and it is only the QueryParameters that has the CDATA. I do not know why.
go to post Michael Wood · Jun 10, 2024 Thanks for you response. It turns out that it was a litimation of %String. I defined the Body property as %GlobalBinaryStream. That worked to pull all the response.
go to post Michael Wood · Nov 29, 2023 does the same apply for if it is an array? The first character is a [ [ { "RequestedTerm":{ "CatalogIdentifier":"S_ASC_CARE_BRANCH", "TermSourceCode":"ASC-BRC-000179", "IncludeDomainCharacteristics":true }, "Messages":[ . . . . ]
go to post Michael Wood · Nov 29, 2023 I tried this, I set pResponse As %String for the method output set pResponse=""set formatter = ##class(%JSON.Formatter).%New()set tJSONFormattedString=""set tSC = formatter.FormatToString(tHttpResponse.Data.Read(),.tJSONFormattedString)set pResponse = tJSONFormattedStringquit pResponse It produces this error ERROR <Ens>ErrGeneral: Quitting with error on Message body 6@AH.AHLIB.Custom.Symedical.Message.PostRelationRequest / 1201174076 because Status 'ERROR #5034: Invalid status code structure ("["_$c(13,10)_" {"_$c(13,10)_" ""RequestedTerm"":{"_$c(13,10)_" ""CatalogIdentifier"":""S_ASC_CARE_BRANCH"","_$c(13,10)_" ""TermSourceCode"":""ASC-BRC-000179"","_$c(13,10)_" ""IncludeDomainCharacteristics"":true"_$c(13,10)_" },"_$c(13,10)_" ""Messages"":["_$c(13,10)_" ],"_$c(13,10)_" ""RelatedItems"":["_$c(13,10)_" {"_$c(13,10)_" ""RelationshipUID"":""1146f07d-9c93-4c4e-82ba-0989fa6a62d9"","_$c(13,10)_" ""RelationshipMnemonic"":""HAS_SITECORE_ID"","_$c(13,10)_" ""CatalogU.....
go to post Michael Wood · Nov 28, 2023 Response is an array so my respose class is defined as, Property Response As list Of AH.AHLIB.Custom.Symedical.Message.PostRelationResponse.response; class AH.AHLIB.Custom.Symedical.Message.PostRelationResponse.response is defined as, Parameter %JSONIGNOREINVALIDFIELD = 1; Property RequestedTerm As AH.AHLIB.Custom.Symedical.Message.PostRelationRequest.termsRequested; Property Messages As %Library.DynamicArray; Property RelatedItems As %Library.DynamicArray; Property SharedRelations As %Library.DynamicArray; Last three properties are arrays, but I don't need their contents. Do I define them right?
go to post Michael Wood · Nov 28, 2023 ERROR <Ens>ErrGeneral: Retrying Message body 6@AH.AHLIB.Custom.Symedical.Message.PostRelationRequest / 1200944442 because response 8@AH.AHLIB.Custom.Symedical.Message.PostRelationResponse Status 'ERROR #9406: Unexpected format for value of field, Response, using class base mapping' matched ReplyCodeAction 1 : 'E=RF' resulting in Action code RF
go to post Michael Wood · Jul 19, 2023 That worked. Thanks. ClassMethod GetObjectFieldValue(pObject As %String, pField As %String) As %String{ quit:pObject="" "" quit:pField="" "" $$$TRACE("pObject="_pObject) $$$TRACE("pField="_pField) set dynObj=##Class(%DynamicAbstractObject).%FromJSON(pObject) set tValue=$PROPERTY(dynObj,pField) return tValue }