User bio
404 bio not found
Member since Jan 3, 2021
Replies:
  1. Hi.

Maybe you should use calculated property - something like this:

Class User.CExampleJSON Extends (%RegisteredObject, %JSON.Adaptor, %XML.Adaptor)
{
Property something As %Integer(%JSONINCLUDE = "NONE", DISPLAYLIST = ",OK,Error,Warning", VALUELIST = ",0,1,2") [ InitialExpression = ];

ClassMethod RunMe()
{
      set obj = ..%New()
      set obj.something = 2       
      do obj.%JSONExportToString(.string)
      write "JSON : " _ string,!!!
      write "Content : " _ ..somethingLogicalToDisplay(obj.something),!
}

Property somethingDisplay As %String(%JSONFIELDNAME = "something") [ Calculated ]; Method somethingDisplayGet() As %String [ ServerOnly = ]
{
Quit ..somethingLogicalToDisplay(..something)
}

}

Certifications & Credly badges:
Matjaz has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Matjaz has no followers yet.
Following:
Matjaz has not followed anybody yet.