Hi
I'm using %XML.Writer to write XML files from a database source, and I see that it is not encoding carriage return or line feed as 
 and 
 respectively, and is instead leaving them unencode.
What can I do to have them encoded?
Andy
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi
I'm using %XML.Writer to write XML files from a database source, and I see that it is not encoding carriage return or line feed as 
 and 
 respectively, and is instead leaving them unencode.
What can I do to have them encoded?
Andy
Is there a straightforward workflow in VS Code for moving a class from one namespace to another on the same server? With Caché/IRIS Studio, it was a (sort of) simple export/change namespace in file menu/import operation. But in VS Code it's not obvious (to me, at least).
I can add multiple namespaces to a workspace, but when using isfs:// paths I see only a "Download" option and no "Upload" or "Import/Compile." When I'm navigating the local file tree, I see Import options, but no way to select the namespace into which I want to import.
I will give you some additional information on my first embedded Python package.
it is written as a mix of python and ObjectScript to take the best of both worlds.
Hey Developers,
New video is already on InterSystems Developers YouTube channel:
Hi Folks,
I created a persistent class as below
Class myclass.DataBase Extends %Persistent
{
Property ID As %String;
Property Skill As list Of myclass.SerialTablelist;
}and Created another Serial class as
Class myclass.SerialTablelist Extends %SerialObject
{
Property PSkill As %String;
Property OSkill As %String;
}Now I will save the id as below
do rs.Prepare("Insert into myclass.DataBase(ID)VALUES(?)")
do rs.Execute(ID)
I am facing issue with the AS LIST OF
Could any one guide me how to save the Skill (PSkill ,OSkill ) using resultset (I am able to )
Hi all - we just released the first episode of Season 2 for our Data Points podcast by Learning Services. This episode features a conversation with @Bob Kuszewski about Embedded Python. If you're a Python developer, or if you're simply interested in the functionality, check it out! For more information, head over to https://datapoints.intersystems.com.
I'm trying to write a method that runs an OS command with $zf(-100,"/ASYNC") and then waits for it to finish before returning, but I can't figure out how to check if the child process (in $zchild) is still running. $System.Process.State($zchild) always returns "RUN" even once the child process is gone. Is there some better way to check this, short of running another OS-specific command and processing the output (which is just really annoying and unelegant)?
Hi, I am trying to work with visual studio with the extensions offered by InterSystems, but I can't find any option to work locally, is there any way to do it?
Hi,
I am using VSCode together with IRIS 2021.1.
When using Shift+Alt+F to reformat a class file, it pops up with the below message. When I select install formatter, it routes me to the extensions page, where it shows the extensions as being installed. Any advice will be appreciated.
Currently running Ensemble on Red Hat Enterprise Linux Server release 7.7
One of our clients is requesting files sent to their SFTP site be encrypted with their PGP public key and digitally signed with our PGP private key
We have created a custom class that includes the following command to encrypt the files
For some years I missed being able to offer, to everybody interested in ObjectScript, a tutorial more or less complete, to start with ObjectScript. Something that could help more and make things easier to those new developers that come to our technology... something intermediate, halfway between the common "Hello World!", that doesn't really get you further, and the "Advanced Training", that is unaffordable because of lack of time,etc.
If there were something truly helpful not only as an introduction to the ecosystem, but as a starting point, as a boost, to really start to walk into ObjectScript and move forward by yourself... wouldn't that be awesome?
If you develop in IRIS you are confronted with two major phenomena:
Is there some generic way to output a %SQL.StatementResult to CSV?
Hi Developers
As you know it's very easy to publish a package to the Developers Community registry.
But how to test it before publishing? How to be sure that everything you introduced into module.xml is installed properly?
See the step-by-step instruction below!
Hey Developers,
Ready to participate in our annual December competition?
Join the Advent of Code 2021 with InterSystems and participate in our ObjectScript contest to win some $$$ prizes!

So I've been reviewing a lot of questions posted in the InterSystems community regarding NULL properties in JSON. I've also been reviewing the JSON documentation. None of these things have been able to help me so far.
1. We don't seem to have the %JSON.Adaptor class available for us to use in our system.
2. I'm not really confident enough to create JSON Type classes or backporting code, etc.
Hi Devs!
Recently, I needed to create templates for newsletters.
I couldn't find any tools, so I decided to use the CSP (Caché Server Pages) to build the templates.
Let's figure out how to make a newsletter similar to Weekly OEX Digest.
.png)
Weekly OEX Digest
There are strict requirements for HTML email messages.
Basic requirements:
The XData (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_XDATA) is a powerful feature to set documentation and metadata information for classes and methods. The %CSP.REST class uses XDATA to mapping REST calls (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GREST_csprest), so in this article you will see how to use XData into your apps as code, not only as documentation.
Hi
I'm using a class which extends %XML.Adaptor adaptor and I want to create an XML file with multiple namespaces, like the following:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> </soap>
However, I don't see how to do this with the code I have. So far, I have
We have a couple of systems that send us a URL link to a PDF instead of base 64 encoding it in the HL7 message. Has anyone ever tired to take that URL, and retrieve the file off of the server to save it off somewhere?
Hey Developers,
Thanks to everyone for participating in the Advent of Code 2021and coding in InterSystems ObjectScript! We're pleased to introduce the winners and distribute all the prizes!
Big applause goes to these developers:
@Yuval Golan (w/ repo)
@Oliver Wilms (w/ repo)
We'd also like to reward another developer who conquered Embedded Python and made all 25 challenges on it. Please welcome:
@Robert Cemper (w/ repo)
Hi Developers,
New video is already on InterSystems Developers YouTube:
⏯ Embedded Python for ObjectScript Developers: Working with Python and ObjectScript Side-By-Side
Setting the Scene
I was editing the properties of a persistent ObjectScript class the other day and noticed that the storage definition wasn't updating to reflect my latest changes.
In this case, I deleted a property that was no longer needed from the class definition, saved, recompiled, and still saw it in the storage definition.
No problem, I thought. If the storage definition gets autogenerated on compile, I can just delete it and recompile the class. Sure enough, after doing this, I no longer saw the deleted property in the storage definition.
There, problem solved... right?
I've found a couple of methods that will tell me whether a package is mapped from another database, but not which database. Is there such a method/routine?
I have an auditing class that defines some sqlComputed properties and can be extended by other persistent classes to enable auditing of its properties.
Class Audit.ModifiedTracker [ abstract ] {
/// Last time this record was saved
Property LastModifiedTime As %TimeStamp [ SqlComputeCode = {Set {*}=$zdt($zts,3)}, SqlComputed, SqlComputeOnChange = ("%%INSERT", "%%UPDATE") ];
/// User responsible for modifying record
Property LastModifiedUser As %String [ SqlComputeCode = {set {*} = ..GetModifiedUser()}, SqlComputed, SqlComputeOnChange = ("%%INSERT", "%%UPDATE") ];Hi folks!
I'm curious if it is possible to change the class method to another class?
I call a method of a system class to generate another class. But there is a bug/feature in a library class, so I need to tweak a bit the generated method, e.g. add additional parameter and change the line to "if" the parameter.
I hope to do this programmatically after class generation and change the code in a way I like.
What are the options?
Hey InterSystems Community,
I noticed something interesting in regards to business rule editing. Whenever you use the Management Portal or Studio to edit a business rule, the " characters gets escaped to a ".
Which results in the following code:
I need to store an equivalent of the SNN (Social Security number). I need it to be encrypted and I'll have to be able to search for it once stored.
For what I've seen my options are:
- SHAHash from the %system.encryption library. Simple and easy to implement. My question is, might collisions be a problem? We are talking about a 10 millions entry.
- AES encryption. In this case I'd like to know if there is a standard way for key management in the InterSystems environment.
I can eventually get a certificate for this project to use other encryption function as well.
Open to suggestions.
Hi Dev Community,
I have a persistent Document class that has a FileName string property and another Question class that has an optional one-to-many relationship with Document.
I'm trying to add a SqlComputed property to the Question class (docFileName) where docFileName = Document.FileName if there is a related Document or an empty string if there isn't one.
I'd prefer the property to be SqlComputed so that if Question.Document changes, Question.docFileName will automatically update.
Does anyone know the syntax for accessing the properties of a related object in the SqlComputeCode?
Thanks!
Hi all, I'm trying to output a XML file, mapped from a ORU_R01 2.3 HL7 message, with a file name based of fields in the source HL7 message in the following format, source.{PIDgrpgrp(1).PIDgrp.PID:PatientIDInternalID(1).ID}_"-"_source.{PIDgrpgrp(1).PIDgrp.PV1grp.PV1:VisitNumber.ID}_"-"_source.{PIDgrpgrp(1).ORCgrp(1).OBR:ObservationDateTime.timeofanevent}To give something like RXR0000000-000000123-20211125105415.xml as the output filename,I initially tried to extend the EnsLib.XML.Object.Operation.FileOperation class and overwrite the OnMessage() method to allow me to specify the filename but I