#JavaScript

0 Followers · 129 Posts

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm.

Learn more.

Article Rob Tweed · Feb 26, 2025 6m read

Introduction

My guess is that most IRIS developers create their applications using its native ObjectScript language or, if using an external language, then most likely using either Java, Python or perhaps C++.

I suspect that only a minority have considered using JavaScript as their language of choice, which, if true, is a great shame, because, In my opinion and experience, JavaScript is the closest equivalent to ObjectScript in terms of its ability to integrate with the IRIS's underlying multi-dimensional database. 

1
2 270
Article Eric Fortenberry · Oct 7, 2025 3m read

While working with external languages for IRIS (such as Python and Node.js), one of the first things you must accomplish is making a connection to an IRIS instance.

For instance, to make a connection in python (from https://pypi.org/project/intersystems-irispython/):

import iris

# Open a connection to the server
args = {
	'hostname':'127.0.0.1', 
	'port': 1972,
	'namespace':'USER', 
	'username':'username', 
	'password':'password'
}
conn = iris.connect(**args)

# Create an iris object
irispy = iris.createIRIS(conn)

# Create a global array in the USER namespace on the server
irispy.set("myGlobal", "hello world!") 

To establish a connection, you must either hard-code connection information in your script or you must prompt the user for the information.

To help manage these IRIS connections in my own projects, I created irisconns on Open Exchange.

irisconns allows you to decouple your connection information from your project/code by allowing you to save that connection information into files that are separate from your code. (Think "DSN" and "ODBC" for your IRIS Native SDK connections.)

Getting Started

To get started with irisconns, create either an irisconns or .irisconns file in your project's working directory, any parent directory to your working directory, or your home directory. Populate your irisconns file with connection information in an INI file format:

# 'default' is the connection returned if no name is provided.
[default]
hostname = localhost
port = 1972
namespace = USER
username = _SYSTEM
# confirm password? true or false?
confirm = false

# This connection name is "TEST".
[TEST]
hostname = test-server
port = 1972
namespace = USER
username = _SYSTEM
# confirm password? true or false?
confirm = false

# This connection name is "PROD".
[PROD]
hostname = prod-server
port = 1972
namespace = %SYS
username = _SYSTEM
# confirm password? true or false?
confirm = false

You will also need to copy the associated irisconns.py or irisconns.js libraries into your project so that you can import the irisconns module from your code. (Currently, only Python and Node.js libraries exist.) You also need to install the IRIS native packages for your programming language:

# Install Dependencies for Python
cp /path/to/irisconns/irisconns.py ./irisconns.py
pip install intersystems-irispython

# Install Dependencies for Node.js
cp /path/to/irisconns/irisconns.js ./irisconns.js
npm install @intersystems/intersystems-iris-native

Using "irisconns"

Once installed, you should be able to use/prompt for your connection configuration:

# Python Connection Example
import irisconns

# default connection
irispy = irisconns.get_irispy()

# named connection
irispy = irisconns.get_irispy('TEST')

# usage
irispy.set('hello world!', 'test', 1)
// Javascript Connection Example

// Import the package
const irisconns = require('./irisconns.js');

// Wrap in an async function so we can await the connection...
(async () => {
  // 'default' connection
  const iris = await irisconns.get_iris();

  // named (i.e. "PROD") connection
  // const iris = await irisconns.get_iris('PROD');

  // usage
  iris.set('hello world!','test',1);
})()

The above code will produce prompts, similar to the following:

# Connecting to default
Hostname    : localhost (default)
Port        : 11972
Namespace   : USER (default)
Username    : _SYSTEM
Password    : [hidden]
Confirm     : [hidden]

Closing

You can find more information about irisconns on the Open Exchange page. Hopefully you will find it useful!

Thanks!

0
0 33
Question David Saunders · Sep 4, 2025

Given the code below, I need help with getting the collected column widths from the Demo.Configuration table and stored in the columnWidths zne page property. As I understand it, I should be able to retrieve it using zenPage.columnWidths in the setColumnWidths or dgRender clientMethods but the alert is showing that it cannot be retrieved as it shows a value of Null. Once I can retrieve those values, then I want to set the widths of the colmns of the dynaGrid according to the values in the ^Demo.Configuration table. The data pulled in from the CSV file that creates ^Demo.Import can have a

2
0 45
Question David Saunders · Aug 12, 2025

I am trying to use upload.csp as a template for choosing a CDV file to process. I am calling it from a zen page using this:
<button caption="Import Client Consultation Extract" 
       controlStyle="width:500px; height:100px; font-size:1.5em;"
         onclick="zenPage.importExtract();"/>

ClientMethod importExtract() [ Language = javascript ]
{
    // Open CSP popup to upload the CSV
    //alert('importExtract called.');
    zenPage.launchPopupWindow(zenLink('Upload.CSP'),'Upload Client Consultation extract',
                              'status,scrollbars,resizable,width=750,height=250');
}

8
0 95
Question Aaron Laferty · Aug 14, 2025

Hi all,

I’m running into an issue with a %ZEN.Component.tablePane in a Zen page.

We have:

  • A fully styled table with all columns defined
  • A backend query (SearchMessages) that accepts multiple filter parameters
  • A set of input fields at the top of the page for filtering (text, date, and checkboxes)

We’re trying to run the query from a button click using a client-side method (runSearch()) that collects the filter values, sets them as parameters, and calls executeQuery().

0
0 48
Article Dmitry Maslennikov · Jul 28, 2025 5m read

Overview

The typeorm-iris project provides experimental support for integrating TypeORM with InterSystems IRIS, enabling developers to interact with IRIS using TypeORM’s well-known decorators and repository abstractions. This allows a more familiar development experience for JavaScript and TypeScript developers building Node.js applications with IRIS as the backend database.

TypeORM MongoDB Review. I recently started using TypeORM in a… | by Eliezer  Steinbock | Medium

While the project implements key integration points with TypeORM and supports basic entity operations, it’s not yet battle-tested or suitable for production environments.

10
1 207
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. We're the ones:

1
2 77
Question Ronaldo Nascimento · Jul 22, 2025

Working on wrapping an IRIS Cache ObjectScript method that runs for a few seconds. Trying to get UI updates to show BEFORE the method runs in an async/await function. But it seems to be running synchronously rather than asynchronously . So my question is does IRIS/ObjectScript CSP pages support futures with JavaScript or does it run all synchronously.

2
0 84
Question Harshitha · Jul 1, 2025

Hi everyone,

I'm working with JavaScript in InterSystems IRIS, specifically in CSP pages. One issue I'm running into during development is that the browser keeps loading the cached version of my JavaScript files, even after I’ve made changes or recompiled the code.
I would have to clear my cache files or browser history for it to reload and work.

2
1 110
Question Michael Davidovich · Apr 10, 2025

Hello,

Our software commonly returns a full result set to the client and we use the DataTables plugin to display table data.  This has worked well, but at datasets grow larger, we are trying to move some of these requests server-side so the server handles the bulk of the work rather than the client.  This has had me scratching my head in so many ways.  

I'm hoping I can get a mix of general best practice advice but also maybe some IRIS specific ideas.

Some background

6
0 152
Question John McBride · Mar 4, 2025

Hello, Does the NodeJs package work when running a node js file on windows (nodejs for windows)? I've added the package by running npm install <package location folder>

I have the following index.js file, but when running from node (windows) I get the following error. Does the NodeJs package build the output files when the package is added or does it just assume linux as the underlying os?

Error: Cannot find module './bin/winx64/irisnative.node'

5
0 114