go to post Robert Cemper · Nov 15, 2017 If you don't want / need the content as object and just want to convert XML2JSONwhy wasting time and energy to re-invent the wheel an not just using any of the many downloadable toolsand call them over $ZF(-2) and consume the result ?Google gave my some thousand hits of tested solutions e.g. https://github.com/sinelaw/xml-to-jsonI mean it's doable with Caché but file_in => file_out is not more than a nice exercise for training.
go to post Robert Cemper · Nov 15, 2017 SQL Code and it's style and methodology was there long before Objects in actual style where introduced. (feeling mid 90ties)It was mainly kept for backward compatibility.In Caché 5 (2002) they were a real parallel universe Object - SQL.Later Computed + SQLcomputed Properties were for long time the only place for common code.
go to post Robert Cemper · Nov 14, 2017 Thanks, totally correct!It's mentioned in line 5 of the doc I pointed to.
go to post Robert Cemper · Nov 14, 2017 Make it a serial class with 2 numeric properties and a calculated for the difference
go to post Robert Cemper · Nov 14, 2017 But 2015 and before has class %ZEN.Auxiliary.jsonProviderhttp://docs.intersystems.com/cache201513/csp/documatic/%25CSP.Documatic....
go to post Robert Cemper · Nov 14, 2017 just a REMINDER: this is next week Tue - Thuhttp://dach.intersystems.de/Symposium2017/AnmeldungI'll be there (unplugged) see you !
go to post Robert Cemper · Nov 13, 2017 Positive! Confirmed!If you highjack your previous workspace (as I did by accident) there's nothing to move anymore.Especially all conections are there already.
go to post Robert Cemper · Nov 13, 2017 Suggested solution:#1 create a ROLE with resources DOCBOOK (Readonly) + the required Nmaspaces#2 remove required resources %Development from web application /csp/documatic #3 next create a user with the new defined role (here: "docread")I decided not to give %Development as it could allow access to terminal prompt.
go to post Robert Cemper · Nov 13, 2017 Thanks, I missed that leaving before And I've seen the new generated code added to %Save()It confirmed my feelings about %* ....
go to post Robert Cemper · Nov 13, 2017 Thank You Alex!I knew it's a can of worms and spread over documentation like feeding pigeons.And honestly I was pretty sure not catch them all and hesitated quite some time to touch it.. Great contribution.
go to post Robert Cemper · Nov 13, 2017 %On... callbacks are served and integrated into he OBJECT world and typically don't care about any Trigger.Triggers live in the SQL TABLE world of your class, with a hand full off %-variables unknown at the Object sideand without an actual instance of object but directly writing to Globals.Take a look to the generated .INT code of your class and see what you have at hands.I always found it quite ambitious to attempt a common code of both sides when directly changing Objects or Tables.Summary:- for SQL access have Triggers- for Object access have your %On* methodsApplies only before 2014.1 as pointed out. But Trigger code doesn't look much better.
go to post Robert Cemper · Nov 10, 2017 something similar: start ; open infile:"R":0 else write "input file not found",! quit open outfile:"WNS":0 else write "error creating output file",! quit set $Zt="end" for line=1:1:5 { use infile read sql use 0 if $e(sql,1,6)'="SELECT" continue set rs=##class(%ResultSet).%New() set sc=rs.Prepare(sql) set:sc sc=rs.Execute() if 'sc write "bad SQL statement",! quit set cols=rs.GetColumnCount() use outfile;; fill in headers if required while rs.Next() { for cols=1:1:cols write rs.GetData(cols),$c(9) write ! } write !,"###",! use 0 } end set $ZT="" close infile,outfile quit !! NOT TESTED !!
go to post Robert Cemper · Nov 10, 2017 %Save() stream doesn't mean closing.and Rewind() is different from %Reload().So the intention of the 3 out-commented lines is not obvious.Opposite to your comment %Open() does a reload from disk.
go to post Robert Cemper · Nov 8, 2017 It's available if you update an already existing object.NOT available for a New or Cloned object
go to post Robert Cemper · Nov 8, 2017 Do I understand it correctly?? Duplicates are allowed but detected.? Uniqueness is not forced
go to post Robert Cemper · Nov 7, 2017 an example how to use:https://community.intersystems.com/post/unlimited-unique-index
go to post Robert Cemper · Nov 7, 2017 Just for info:I'm elaborating a suggestion for an 'unlimitted' UNIQUE index based on old code fragments.It may take some time depending on my luck on personal backups.Here it is:https://community.intersystems.com/post/unlimited-unique-index