Hi Developers!
Currently I have 2000+ lines in a class, and I think it's a lot already? What are the best practices?
if 10K lines OK? How do you cope with it? Please share?

A tag that highlights questions on development, testing, deployment, management, etc using InterSystems Data Platform that are considered to be the most insightful, interesting, puzzling, or important. If a key question includes a best practice, it will also be tagged as such. More details.
Hi Developers!
Currently I have 2000+ lines in a class, and I think it's a lot already? What are the best practices?
if 10K lines OK? How do you cope with it? Please share?

Please, provide Code example to build a %Library.DynamicObject or a %Library.DynamicArray from Resultset followed by converting to JSON
Hi developers!
In a method I need to return a result as a dynamic object aka JSON Object. And here is my logic:
Classmethod Planets() as %DynamicObject {
set val1="Jupiter"
set val2="Mars"
// this doesn't work! cannot compile
return {"value1":val1, "value2":val2}
}So I need to do the following:
Hello all,
I have a EnsLib.HTTP.GenericMessage inbound from a webhook with a GC stream.
My router is defined as the following:
Hey Community,
It's time for a fresh batch of #KeyQuestions from the 1st quarter of 2026 (January to March). Take a look at what has been stirring the discussion over the past three months.

We are a group of interface analysts in a healthcare setting, running IRIS for Health 2024, having upgraded over time from an old ENSEMBLE environment. We have been working on a wish list of development goals, but are having trouble finding the correct, best practice method/path for getting to what we envision.
Current state: We run IRIS for Health on a Redhat 8 virtual machine. We run Interoperability productions (IE.cls) out of 6 namespaces. We have a dev/test box and a production box.
I have a business service that actively reads data from a remote Postgres database. OnProcessInput opens a XDBC (actually JDBC) connection, executes an SQL query, fetches several thousand rows, iterates the resultset, and closes the connection. On each iteration I also need to update each source row in the remote database using PreparedStatement.
In other words, in every OnProcessInput call I have a long running SELECT statement and several thousands small UPDATE statements.
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

In some cases, it's necessary to manipulate data from one namespace to another. For example, a routine in the "N1" namespace needs data from the "N2" namespace. In legacy systems (using only globals), it's common to make the global universal, but what about persistent classes? Is this type of globalization also possible?
In the same context, how could I make a persistent class global for all namespaces? The only way I know is by putting it in %SYS.
The following regex is matching while I think it should not :
write$match"♥"It should only match the '?' character. I think what happen is the ♥ character got converted to '?' (as it's not within regular ascii range) before being validated by the regex engine.
In fact, this give a clue about what happen :
Is this an IRIS well known limitation, is there workarounds ? Should I report it to InterSystems ?
In my case, a way to detect non standard ascii code in a string will be good enough.
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

How to define a For loop in *.inc file?
Is there any way of saving a representation of the results of a query created in the Message Viewer to a file - most obviously CSV.
We are reasonably adept at creating queries. We'd like to be able to send the output to a file, rather than resorting to cut'n'pasting from the message viewer window...
Is this possible? (on any version of Ensemble/Iris?)
.png)
Desired output to file something like:
ID,TimeCreated,Session,Status,Error,Source,Target,Body_MSH_MessageControlId,..... 1,8888888,2025-08-20 05:03:14.324,8438123,Completed,OK,ICE ADT Validator,ICE ADT TCP,1z123456,20220822......
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.
![]()
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

I am trying to add Plotly Bar graph in a div to a CSPpage. I am working in IRIS 2022.1. I created persistent class.
I copied relevant code into github repo:
oliverwilms/iris-python-plotly
iris-python-plotly/csp/otwPlotly.csp at master · oliverwilms/iris-python-plotly
Set tPlotlyDiv = ##class(dc.python.test).PlotlyDiv(trnYear,trnMonth)
ClassMethod PlotlyDiv(pTrnYear = 2025, pTrnMonth = 8) As %String
{
Set importlib = ##class(%SYS.Python).Import("importlib")
Set plotdiv = ##class(%SYS.Python).Import("plotdiv")
Do importlib.reload(plotdiv)
Set div = plotdiv.
Some languages have the concept of a garbage collector for automatic memory management. I'd like to know if something like this exists in InterSystems Caché in the context of routines, %CSP.REST, or %CSP.Page.
The question arises from the %Close() method of the %RegisteredObject class. This indicates that I need to manually clear the object from memory if it's no longer in use, or in the web context, if the request has completed. Is this correct? Or am I completely wrong?
Thank you!
Is there a better way (i.e., without string commands) to remove the fractions of seconds from a %Library.PosixTime value?
This works, but seems inefficient:
set1154669852181849976wNote that I don't need the last string output; the value stored in "newposix" is what I want to retain.
Thanks in advance
I am trying to help another group within our organization access a SQL Table that I have created to populate Epic Department Data within our environment and came across the ability to use SQL Seach REST Interface using iKnow.
However, I am having issues trying to get it to work via POSTMAN before I hand off the solution...
the POST URL... https://<servername>/api/iKnow/latest/TESTCLIN/table/osuwmc_Epic_Clarity.DepartmentMaster/search
where osuwmc_Epic_Clarity.DepartmentMaster is the table
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

Hello
I want to get the property of a class, sorted by order in storage.
I know we can use
Set##classBut using GetAt sorts the results alphabetically.
Example :
ExtendsAslistProperty.GetAt(1).Name = "journal" and listProperty.GetAt(2).Name = "tiers"
But I would like it to be instead: listProperty.GetAt(1).Name = "tiers" and listProperty.GetAt(2).Name = "journal"
Do you have a solution, please?
Corentin
Hi,
sometimes we need more then one Iris container at the same time. Since as containers they always have the same instance name shown in the management portal, it is hard to distinguish the management-portals of the instances. Searching for a way to make it easier I thought I could change the instance name shown in the management portal. I tried "iris rename" in different ways but could only change the configuration name which is shown by "iris list", not the name in the management portal.
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

I seem to remember making this work before, but I'm not having any luck digging up examples.
I've defined some custom properties for a business operation that could definitely benefit from having popup descriptions available in the Production Configuration. I have triple-slash comments before each property that do just that in the source. I thought those provided the text for the popup descriptions when clicking on the property name, but apparently not.
Any thoughts?
Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.

Hey Community,
It's time for the new batch of #KeyQuestions from the previous month.
