Code snippet

Subscribe to Code snippet content with RSS Syndicate content or email

Old/New Dynamic SQL Cheat Sheet

The newer dynamic SQL classes (%SQL.Statement and %StatementResult) perform better than %ResultSet, but I did not adopt them for some time because I had learned how to use %ResultSet.

views

rating

use punycode in caché

Hi everybody, We have written a convert from Punycode. This is reformed from javascript. Perhaps many non-English systems need to use this feature in domain name resolution. Anyone can use and change the code as needed.

views

rating

How to convert JSON to %ListOfDataTypes?

Hi.

It is easy to receive JSON representation or dynamic Array from %ListOfDataTypes:

views

rating

cache program to compare two files

How can i compare two files using cache program, i need this for unit testing purpose 

views

rating

How to avoid truncation in HL7 messages with very large fields (32K+)

DTL Transformations and GetValueAt/SetValueAt calls on HL7 messages will truncate any fields longer than 32K.

views

rating

How do I get a list of files in directory including subdirectories?

I'm aware of two ways to get list of files in a dir:

set dir = "C:\temp\"
set rs = ##class(%File).FileSetFunc(dir, , , 1)
do rs.%Display()

and:

views

rating

Ensemble: How to embed a PDF file into an HL7 message

This article will describe and include an example of how to embed an external PDF file into an HL7 segment, specifically ADT_A01:2.3.1 OBX().  This can be useful when attempting to insert pictures or other externa

views

rating

Map, Reduce and Filter Collections

Inspired by the article "Declarative development in Caché" that's still trending  on the dev com.

views

rating

Copying all the classes in a package to a new package

Hello ISM Community,

Is it possible to copy all the classes in a package to a new package in Studio?

If not does anyone have some ObjectScript code that does this?

Regards

Mike

views

rating

String Datatype with regular expression validation

Hi folks,

I've created a datatype class whoch extends from %Library.String with a REGEX parameter and the validation of the value against the regular expression. The class does not support Populate using the regular expression as a template for data population.

views

rating

Sending Email notifications "On behalf of"

A feature I recently used in working on ISC internal applications is the ability to send emails on behalf of someone.

views

rating

Trusting the code you import

As more people join Developer Community, and with increasing efforts to promote code sharing, I'd like to draw fresh attention to

views

rating

Generating PDF from XSL-FO using the HotJVM Render Server

This article is little explanation to a GitGub project.

views

rating