Robert Cemper · May 3, 2022 go to post

You depend on the structure of the dynamic object you compose in the 1st line.
if it has a property TitleID  it will work. (using obj.TitleID   lower case!!)

But in your question, it is not clear what Title Class refers to.
I see All.Allbooks and somewhere User.Book and also %request  and no other class around

Robert Cemper · May 2, 2022 go to post

I guess you look for this:

ClassMethod GetABookById(id As %Integer) As %Status
{ 
 SET MyBooks = ##class(All.Allbooks).%OpenId(id)
 SET obj={} 
 set obj.ID=MyBooks.%Id()
 set obj.Title=MyBooks.Title
 WRITE obj.%ToJSON()
 Quit 1
}

ATTENTION:
MyBooks.Title is just a reference to User.Book

Robert Cemper · Apr 28, 2022 go to post

yes 

For some of them exist even concrete proposals for solutions.  (e.g. Global <-> JSON) 

Robert Cemper · Apr 26, 2022 go to post

this worked for me

select CAST(0+AVG(PackingTimeSpent) as TIME) average ....

the 0+ forces Integer, then CAST understands you
and pls. don't ask why. I just tried 
the output from AVG() is definitely NOT Integer

Robert Cemper · Apr 25, 2022 go to post

this are not properties but an ERROR Status Object.
the boxes are non-printable binary values from $LB() or similar.

Robert Cemper · Apr 18, 2022 go to post

Hi @Evgeny Shvarov,

I run my Docker Desktop on WIN10 
And with my setup, I have reviewed more than 300 Docker build sequences

Always focused on how easy it is for the average consumer and how well the description fits reality.
This package forced me to exercise settings that were just not needed before
And (differently from others) there is not the slightest signal in the description of that requirement.
It's some *KIT*  stuff and the official doc doesn't care much about WIN.
it finally moved along. and others should be warned [getting rid of it was another story]
And the result was something that I see multiple times daily in my SMP instances.
Sorry!
Nice screenshots from VSCode.
Just to be clear: I tried but will never use VSCode as long as I have my Studio available.
And I never touched it in any of my reviews or other situations.

Robert Cemper · Apr 17, 2022 go to post

You are right.
But it works in a test within a Try-Catch bloxk
   

     try {
         ;;; run your code
         }
     catch e {  
        if $ze["<RESJOB>" while $TLEVEL { tcommit }
        }
Robert Cemper · Apr 17, 2022 go to post

It is rather brute force but matches your decision to skip rollbacks: 

while $TLEVEL { TCOMMIT }

to be sure to catch all cases I'd place it in a  %ZSTOP.mac 
It's the reverse of %ZSTART.    >>  docu

Robert Cemper · Apr 7, 2022 go to post

at first sight, it looks like an issue on variable scoping with embedded SQL
a quite old issue
try %suspendedCount instead of suspendedCount
 

&sql(SELECT count(ID) into :%suspendedCount FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='Suspended' )
resulting  0 into suspendedCount
Robert Cemper · Apr 3, 2022 go to post

To force it to string you have to append some non numeric character ! 
but this one is then part of the subscript as $c(0) or whatever you append
in addition, you break the numeric sort and change to string sorting.

USER>set s1=111,s2=444,q="."
USER>set a(s2)=1,a(s1)=2,a(s1_q)=3,a(s2_q)=4
 
USER>zw a
a(44)=1
a(111)=2
a("111.")=3
a("44.")=4
Robert Cemper · Apr 2, 2022 go to post
 
USER>set s1=111,s2=444
USER>set a(s2_$c(0),s1_$c(0))=77
USER>set a($c(0)_s1,$c(0)_s2)=99
USER>zwrite
a("111","444")=99
a("444","111")=77
s1=111
s2=444
USER>

"save it from the class " ?  whatever that may mean .... ?

Robert Cemper · Mar 30, 2022 go to post

you may try

USER>write $tr("abcdefghijkl","abcdxefxghxijxkl","2022-03-29T15:10:00+0100")
Robert Cemper · Mar 29, 2022 go to post

SendRequestSync   is an object method that requires an object as the base.
##class(Ens.BusinessService).SendRequestSync(   works for ClassMethods only.
You need an object instance of Ens.BusinessService to call it.
##class(Ens.BusinessService).%New().SendRequestSync( 
might be a dirty workaround

Robert Cemper · Mar 29, 2022 go to post

just checked %Library.Routine
- a sample of many %R* routines
- lots of @ indirections
- DO with . (dot) syntax
- and of course GOTO.
Just to qualify the code inside.