Robert Cemper · May 5, 2022 go to post

the story is clear.  Your class definition is not.
once more pls show class definitions for RESTAPI.TITLE   and    ??.BOOK   
(every class has also a package, default is User) 
you may need Studio od VSCode  to see it.

and {"ID":17, "Title":"LEARNING CAHE REST API"} is a
Dynamic JSON object unrelated to any class definition

Robert Cemper · May 5, 2022 go to post

This returns to what we were talking about yesterday.

You mix classes with JSON objects and RowID might be something different.
so pls add the definition of the classes you talk about (e.g: RESTAPI.TITLE and  TITLE table ??)
it's not obvious what you refer to in "object withoutID but having RowID" ???

How did you get the screenshot?

Robert Cemper · May 5, 2022 go to post

Assuming your RowId is unique you can define a unique Index on it.

Index RowIdx On RowId [ Type = index, Unique ];

now (after building that index) you can open your object by its RowID​​​​​​​

SET task.Title = ##class(RESTAPI.TITLE).RowIdxOpen(RowID)
Robert Cemper · May 5, 2022 go to post

Every Database in Caché or IRIS has a "NickName" (TEST, APP, USER, *TEMP, ..)
The file location is just a pointer related to the location of the file used
Similar Resource is an attribute to this "NickName".  and NOT to the related file
Changing it affects user access, but doesn't care at all about the file location.
The *.DAT file has no information about Resources or its NickName.  
Way back in the past, when file sizes were limited by file systems, there were
"Continuation" Files for Cache.DAT. Those knew the starting Cache.DAT.
But this is decades back and gone and doesn't exist anymore. 

Robert Cemper · May 5, 2022 go to post

To find this quoting in Windows kept me busy for quite a while 2 months ago
as it wasn't part of the README.md  !
 

GRAND MERCI !

Robert Cemper · May 3, 2022 go to post
  • so your obj is a DynamicObject and looks something like { "ID":17, "Title": 44 }
  • class All.Allbooks has this Property Title As User.Book. 
  • To set it you need an oref !!

therefore to create the required oref :

SET task.Title = ##class(User.Book).%OpenId(obj.Title)
Robert Cemper · May 3, 2022 go to post

I will not be present, but my main interest is and ever was
Distributed Code and Version Management in a World Wide Scope  
I experienced it in personal practice and was always impressed how well that worked.

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