go to post Robert Cemper · Jul 14, 2022 in ObjectScript it might belist("A","x")=""list("B","y")=""list("C","z")="" and you pass it by reference do method(.list)and consume is using $ORDER() or $QUERY()
go to post Robert Cemper · Jul 14, 2022 and of course any TRIGGER on DELETE will give you more optionse.g. LOG^%ETN() to dump the full call stack
go to post Robert Cemper · Jul 5, 2022 Hi @Marcel den Ouden I did something similar a few years back for an ISC internal project.I required 2 tables to achieve this- mapping of the location to timezone code (geographic coordinates are often misleading, STATIC)- rules and offset from UTC (daylight Saving Y/N, the window when to apply,...) might be flexible- $ZTZ is your friend and the Docs are really excellent also for special cases A further complication is mobile use.example:- You go to Summit in Seattle. (UTC-7)- you need to arrange a concall with a customer in Amsterdam (UTC+2) (CEST!)- and meeting in Nov. (UTC+1) back to normal time- And you need to know the time zone used by your notebook (local or home or other?) For the notebook, I used some JavaScript as the app was written in ZEN (10 yrs.back)and it was mine and I could control it.see more in my Article Global Time Management
go to post Robert Cemper · Jul 4, 2022 From your description, it is obvious that you write ALL global streams just to default ^CacheStream. To separate them you may set individual Globals for streaming (e.g depending on use-case) Class %Library.GlobalBinaryStream has this parameter + property: /// Default location: can be overridden at run-timeParameter STOREGLOBALNAME = "^CacheStream"; /// Root is Global Location (name and top subscripts)Property StoreRoot As %String(MAXLEN = 5000) [ InitialExpression = {..#STOREGLOBALNAME}, Private ]; Property rollback As %String [ MultiDimensional, Private ];You can change this default using the method Method %LocationSet(value As %String) As %Status{ Do ..Clear() Set ..StoreRoot=value,i%%Location=value Quit $$$OK}
go to post Robert Cemper · Jun 27, 2022 Default Samples.Person use the implicit ID. You need to change or write your own Method %IdSet or Define your own property as ID
go to post Robert Cemper · Jun 24, 2022 Suggestion:add Property Val as Serials.Value;in your main classandClass Serial.Value Extends %SerialObject {Property Single as %String;Property Tsh as %String;Property T4 as %String;Property T5 as %String;} in SQL you see it as columns Val_SingleVal_TshVal_T4Val_T5
go to post Robert Cemper · Jun 23, 2022 $QUERY() needs a Global reference: ^je1("NotConfigured" is OK node is just a local variable and not OK to use it you have to apply an indirection >>> @node I have edited my reply after the first sendand better use %node as indirection is context sensitive.
go to post Robert Cemper · Jun 13, 2022 you get <FILEFULL> in the directory e:\eos\ and this is full. Whatever file you write there.could E:\ be your journal location ? or temp ?
go to post Robert Cemper · Jun 7, 2022 Between 2 servers you may use this: Background-Jobs-ECP or ObjectScript-Over-ODBC
go to post Robert Cemper · May 28, 2022 set sc=rs.Execute("a") You pass a paramter,but there is no need for a parameter visible. NO ? in query try set sc=rs.Execute()
go to post Robert Cemper · May 28, 2022 Just an idea:wouldn't CopyFromAndSave(source As %Stream.Object) be a better approach ??
go to post Robert Cemper · May 28, 2022 Httprequest.EntityBody is a %GlobalBinaryStream object.In your code I see Do Httprequest.EntityBody.Write(mystring) But no %Save() to take care of completion and persistence of the object
go to post Robert Cemper · May 26, 2022 Congrats!By manual intervention, you managed to get your index out of sync with your date.Check this Repairing your Index Sorry the method is not yet available in 2014.1 you need a Rebuildindex (from SMP)
go to post Robert Cemper · May 22, 2022 Do you expect to save #1) the input JSON object or#2) a dump of the converted result?For both: set stream=##class( %Stream.GlobalCharacter).%New() #1) with myjson as your JSON input do stream.Write(myjson) do stream.%Save() #2) dump the generated Object obj using my package Full-OBJ-Dump described here do ##class(Z.obj).dumpToStream(.stream,obj,1) do stream.%Save()
go to post Robert Cemper · May 18, 2022 Take a closer look to Caché I/O Device Guideespecially Chapter 5: TCP Client/Server Communication
go to post Robert Cemper · May 17, 2022 As you operate on 2014.* just write it down as any other string. after 2017.1 you may (but are not forced to) use %DynamicObjects and %%DynamicArrays.but the result looks the same
go to post Robert Cemper · May 17, 2022 Status= 1 justteslls you tht the HTTP connection was processed OK.Next you need to take a look into your response object. set res=Httprequest.HttpResponsein terminal then ZW res to see in the Status is 200 OKotherwise what you see I res.Data might be just an error page.Which is also OK for HTTP but not for your content. • property ReasonPhrase as %String; This is the human readable reason that goes with the StatusCode. • property StatusCode as %Integer; The HTTP status code. This is useful to determine if the request was successful. Look in the rfc for HTTP to see which codes are supported and what they mean. A human readable form of this code is stored as the ReasonPhrase • property StatusLine as %String; The HTTP status line. This is the first line of the response and signals if the request was successful or if there was a problem.
go to post Robert Cemper · May 17, 2022 I found %DynamicObjects first in Caché 2017.1 Class Refhttps://cedocs.intersystems.com/ens20171/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=%25SYS&CLASSNAME=%25Library.DynamicObjectIn 2014 this was somehow buried in %ZAN.Auxilary.???
go to post Robert Cemper · May 8, 2022 You might take a look to this article Global archiver - Moving a part of a global.And the related package in OEX global-archiver
go to post Robert Cemper · May 6, 2022 Now with the class definition available, I understand(?) what you are looking for.I see 2 possible solutions: embedded SQL or an Index on Title#1 ClassMethod TitleToRowId(title) As %String [ PublicList = (title, rowid, SQLCODE) ]{ &SQL( SELECT RowId into :rowid FROM REST.TITLE WHERE Title = :title ) if 'SQLCODE quit rowid quit SQLCODE} btw: SQLCODE=0 means success. and you get the RowId by SET RowId=##class(REST.TITLE).TitleToRowId(obj.Title) ;obj=JSON SET task.Title = ##class(RESTAPI.TITLE).%OpenId(RowId) SET book.Title = ##class(RESTAPI.TITLE).%OpenId(RowId) ; recent example #2 creating an Index on Title in REST.TITLE. but you have all trouble on duplicates, max. string length on that index So I'd position it as elegant but rather risky on maintenance