#ObjectScript

14 Followers · 1.6K Posts

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.

Documentation.

New
Article Kristina Lauer · 3 hr ago 2m read

Hi Community,

Take a look at these new videos in online learning, and get familiar with new features and interfaces in the latest release of InterSystems® products. All videos are also available on YouTube in the Learning Services YouTube channel.

Plus, check out a video for new ObjectScript developers, and a guide for HealthShare® users upgrading their deployments.

Videos for the Latest Release of InterSystems Products

  • Goal: Learn about enhancements to the interoperability UI in version 2026.1 of InterSystems products.
0
0 9
New
Question Scott Roth · 8 hr ago

Was wondering if anyone had a Dynamic way to see if a Global is still being used by a Class File. 

We have been monitoring our Global Size recently, and I am trying to find problematic Class files that are not being cleaned up or used appropriately. I have come across some globals that do not seem to have a Class attached to them anymore, and instead of deleting globals 1 by 1, I was looking for a way that we could dynamically do this since the globals have data that is stale in them.

Thanks

Scott

6
0 29
Contestant
Article Andrew Sklyarov · 16 hr ago 4m read

Hey Community, 

Yeah, I know we have a lot of tips & tricks articles - we even have a special tag for it, right? But I can not share my own collection. In this collection, you can find snippets for beginners, as well as some everyday ObjectScript constructions. In fact, it's also a way to learn something new about my favorite programming language. So, if you guys have anything to add, you are welcome!

5
3 79
Contestant
Article Dmitry Maslennikov · Apr 18 5m read

Most IRIS developers use $LISTBUILD every day — often without even noticing it.

It is not just a convenient function for building lists. It is also the default internal format used to store row data, global values, and many intermediate structures inside the database engine.

Despite this, the actual binary representation of $LISTBUILD values is rarely discussed. Most developers rely on its behavior, but never look at how the data is really stored.

This article focuses strictly on the binary layout of $LISTBUILD values, based on direct inspection via zzdump.


11
7 154
New
Question Andrew Sklyarov · Apr 18

I need a %SYS.Python object that will be accessible from different processes. The goal is to avoid reinitializing the Python object whenever it is called. Ways that I checked and decided that it is NOT what I want:

  • %-variables (process variables). Reusing only in the same process
  • Save-and-restore via globals. Restoring means heavy initialization, which I want to avoid

Next, my ideas (none of them look like a silver bullet):

  • Using Interoperability Production.
5
0 97
New
Article Yuri Marx · Apr 20 25m read

What is a Microservice?

A microservice is an architectural style that structures an application as a collection of small, autonomous services. Each component is developed around a specific business capability, can be deployed independently, and is typically managed by a miniature, specialized, self-governing team. (Source: https://microservices.io/)

0
2 71
Contestant
Article Roy Leonov · Apr 14 7m read

We didn't start with a big AI strategy.

We had a legacy InterSystems Caché 2018 application, a lot of old business logic, and a practical need: build a new UI and improve code that had been running for years. At first, I thought an AI coding agent would help only with a small part of the work. Maybe some boilerplate, some REST work around the system, and a bit of help reading old ObjectScript.

In practice, it became much more than that.

0
2 65
Article Vachan C Rannore · Aug 18, 2025 3m read

While starting with Intersystems IRIS or Cache, developers often encounter three core concepts: Dynamic Objects, Globals & Relational Table. Each has its role in building scalable and maintainable solutions. In this article, we'll walk through practical code examples, highlight best practices, and show how these concepts tie together. 

1. Working with Dynamic Objects:

Dynamic objects (%DynamicObject and %DynamicArray) allow developers to manipulate JSON-like structures directly in Objectscript. They are especially useful for modern applications that need to parse, transform or generate JSON.

5
7 380
New
Question Scott Roth · Apr 13

This past weekend we ran into something odd. When we failed over our mirror from 2022.1.3 to 2025.1.3 the one of the Business Rules that was on what became the Primary (2025.1.3), had a rule within it that was removed back in January. When the Failover occurred, we had to scramble to backup, disable, and remove the Rule that shouldn't have been there. 

Both the Data and Code live within the same IRIS.dat that is the main MIRROR database for that Namespace. 

If this happened to one Class file, could it happen to others we do not know about?

4
0 91
New
Question Jainam Shah · Apr 12

Hello,

I am working on integrating a CELL-DYN Ruby hematology analyzer (Abbott) with InterSystems Ensemble using the ASTM E1394 protocol over TCP/IP via a Digi One SP serial-to-TCP converter. I am facing a persistent issue where the Link Test keeps failing on the CDRuby side and the Transmit button remains greyed out. I have overridden EOTOptional=1 in the service class file as Ensemble was not able to send ACK after ENQ. Now I am getting below logs like Machine sends ENQ, Ensemble sends back ACK and Machine sends EOT instead of STX.

1
0 25
Question Evgeny Shvarov · Feb 5

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:

28
1 335
Article Robbie Luman · Aug 15, 2025 7m read

Dynamic Entities (objects and arrays) in IRIS are incredibly useful in situations where you are having to transform JSON data into an Object Model for storage to the database, such as in REST API endpoints hosted within IRIS. This is because these dynamic objects and arrays can easily serve as a point of conversion from one data structure to the other.

6
6 466
Article Iryna Mykhailova · Apr 9 3m read

Since I started using Claude Code, my motivation to create things has skyrocketed.

Previously, even if I wanted to build something, actually doing the coding felt like a hassle, so unless there was a very strong need, I rarely went as far as programming. But now, if I just jot down the specifications, Claude Code handles the rest automatically, resulting in a dramatic improvement in productivity.

I come from a generation native to ObjectScript, so I used to feel some hesitation when it came to switching to Python.

0
0 47
Question Scott Roth · Apr 6

I am trying to built a Task that kicks off a Workflow to pull data into HSPD, and when I try to test the Task

ClassMethod TestTask()
{set tTask = ##class(OSU.Workday.TerminationsTask).%New()set tTask.DaysBack = 1 $$$ThrowOnError(tTask.OnTask())}

I keep getting TestTask+3^OSU.Workday.TerminationsTask.1 *%Exception.StatusException ERROR <Ens>ErrConfigDisabled: Configuration item 'OSU.DataSource.Workday.TermService' is disabled

But within the Namespace the OSU.DataSource.Workday.TermService shows enabled.

Here is my Task that I am using...

Class OSU.Workday.TerminationsTask Extends %SYS.
7
0 69
Discussion Gabriel Ing · Mar 4

Anyone up for a round of golf?

Are you fed up of making a machine write code for you? Do you miss thinking through problems yourself? Then you are in luck, this round, I propose adding the rule of no AI use. obviously its a game of honor with no prize, so I shan't be enforcing this, but you'll know... 

Challenge:

Create a function which takes a string as a parameter, and returns the length of thelongest sequence of alternating consonants and vowels. The sequence is broken by having two vowels or two consonants in a row.

10
1 259
Article Harshitha · Aug 3, 2025 2m read

Working in healthcare IT as a young developer, especially on InterSystems TrakCare, you quickly realize one thing: it’s not just about HL7 messages or backend integrations. A hugepart of making TrakCare work smoothly for hospitals comes down to how it’s configured, customized, and supported on the application side.

That’s where people like me come in—techno-functional developers who understand both the tech and how it impacts actual hospital workflows.

We’re Not Just Techies (or Functional Consultants)

Our role sits right in the middle.

3
3 256
Article Guillaume Rongier · Mar 13 6m read

ObjectScript Search icon

If you have ever dug through a large IRIS namespace looking for where a particular string, method call, or pattern was used, you know the pain: there was no built-in way to do a grep-style search across your server-side ObjectScript code from VS Code — at least not without jumping through some hoops.

That is what ObjectScript Search fixes.

Try it today with a simple install from the VS Code Marketplace. If you don't like it, uninstalling is just as easy. But I think you will like it — it is a huge quality-of-life improvement for anyone doing ObjectScript development in VS Code.


9
3 257
Article Lorenzo Scalese · Feb 20 6m read

Introduction

The standard %Net.HttpRequest library in InterSystems IRIS is powerful and comprehensive, but it can be verbose for simple operations. Writing an HTTP request often requires several lines of code to instantiate the class, configure the server, the port, HTTPS, add headers, and finally send the request.

When testing in the terminal, this configuration quickly becomes too heavy, and usually ends up with the creation of temporary methods...

FastHTTP

2
4 253
Question Scott Roth · Mar 23

I have created the following Task to kick off a Ens.BusinessService to execute a SQL query and process the results

Class OSU.Workday.TerminationsTask Extends %SYS.Task.Definition
{

Parameter TaskName As STRING = "OSU - Workday Termination Update";

Method OnTask() As %Status
{
    #Dim sc as %Status
    #Dim ex as %Exception.AbstractException
    
    set sc = $$$OK

    try{
        // create the service
        #Dim tService As OSU.DataSource.Workday.TermService
        Set tServiceConfigName = "OSU.DataSource.Workday.
1
0 45
Article Joel Solon · Jul 29, 2025 12m read

Imagine you’re walking down the street on a nice summer’s day, and someone walks up to you and says “Hey, you work at InterSystems, right? I’ve been hearing more and more about InterSystems IRIS lately. I know IRIS has its own programing language called ObjectBook? or InstaScript? OK, I admit it, I know it’s called ObjectScript! I know IRIS also supports Python. I’m a Python developer, so that sounds great to me. But I’m also interested in ObjectScript. For example, Python and other languages support collections. Does ObjectScript support collections?”

You’d answer “Of course!”

And then your new friend might get excited and start firing off more questions:

  • How many kinds of collections does ObjectScript support?
  • Can ObjectScript use Python collections?
  • Can Python use ObjectScript collections?
  • Which collection is best?

How would you answer? Well, you don’t have to worry about answering. All you’d have to do is send your new friend the URL of this long page.

1
0 416
Announcement Ali Nasser · Feb 18

https://learning.intersystems.com/course/view.php?name=IntegrationsNewU…

Hello DC community, 

InterSystems Certification is currently developing a certification exam for ObjectScript developers, and if you match the exam candidate description below, we would like you to beta test the exam! The exam will be available for beta testing starting February 18th, 2026. 

Beta testing will be completed May 4, 2026.

6
2 753
Question Scott Roth · Mar 12

We are trying to track down significant growth within our Namespaces, one big culprit is Ens.AppData (EnsLib.SQL.Snapshot). 

Within many of our BPL's we use EnsLib.SQL.Snapshot to return Results from External SQL Stored Procedures or Query's. The same EnsLib.SQL.Snapshot context variable is used for many of these calls within a BPL. 

Is there something we should be doing at the end of the BPL to ensure that EnsLib.SQL.Snapshot gets cleaned up and purged from Ens.AppData?

1
0 40
Question Scott Roth · Mar 10

How can I create a Task that tells a Ens.BusinessService to execute its SQL query using the EnsLib.SQL.InboundAdapter?

So far I have come up with

Class OSU.Workday.TerminationsTask Extends %SYS.Task.Definition
{

Parameter TaskName As STRING = "OSU - Workday Termination Update";

Method OnTask() As %Status
{
    try{
        // Call BusinessService
        set tSC = ##class(Ens.Director).CreateBusinessService("OSU.DataSource.Workday.TermService",.tService)

        if $IsObject(tService){
            set inputMessage = ##class(Ens.StringContainer).
6
0 81
Article Scott Roth · Mar 11 3m read

Background

Emergency Medical Services (EMS) teams often arrive at the emergency department with patients whose demographics are incomplete or unknown—no medical record number (MRN), no confirmed name, and sometimes no date of birth. Yet EMS transportation notes still need to land in the correct chart.

To support safe and reliable documentation, EMS agencies, third-party integration services, and hospital integration teams build secure interfaces that exchange identifiers and clinical messages.

0
0 73