Hi community,
This is another article about how to perform actions that you can do in the web portal but via code.
Today.... Add a default setting value by code
Pieces of experience in InterSystems Technology which solve some particular problem in elegant or unusual way.
Hi community,
This is another article about how to perform actions that you can do in the web portal but via code.
Today.... Add a default setting value by code
Hi folks!
Want to share a lifehack with you on ObjectScript highlighiting withing VSCode for script files.
Script files are just files with lines of ObjectScript that we feed anywhere, e.g. into IRIS during Docker baking procedure.
Typical usecase - here is the Scriptfile
here is the Dockerfile where we feed it.
And here is how it looks like usually in VSCode:

Coudl be more beautiful, right?
Hi community,
This is another article about how to perform actions that you can do in the web portal but via code.
Today.... Add a business item in your production by code
Hi community,
I'm going to publish several articles on how to perform actions that you can do in the web portal but via code.
Today.... Web Applications via code
Sometimes you when create a pivot in Analyzer and see the result that shouldn't exist - don't run to create a WRC ticket, try to call the IRIS BI reset function first:
d $System.DeepSee.Reset(1)And in many cases this will solve the problem.
And if it doesn't help, create a WRC ticket )
Hi developers,
In this post, we would like to tell you how to take the most out of the Developer Community, to learn as much as you can from the InterSystems experts on the technology!

Pay attention to these steps to become an advanced user of our community!
This time I want to talk about something not specific to InterSystems IRIS, but that I think is important if you want to work with Docker and your server at work is a PC or laptop with Windows 10 Pro or Enterprise.
As you likely know, containers technology comes basically from Linux world and, nowadays, is on Linux hosts were it shows maximum potential. Those who use Windows on a normal basis see that both, Microsoft and Docker, have done important efforts during these last years that allow us to run containers based on Linux images on our Windows system in a really easy way... but it's something not supported for production systems and, this is the big problem, is not reliable if we want to keep persistent data outside of containers, in the host system,... mostly due to the big differences between Windows and Linux file systems. In the end, Docker for Windows itself uses a small linux virtual machine (MobiLinux) to run the containers... it does it transparently for the windows user... and it works perfectly well if, as I said, you don't require that your databases survive longer than the container...
Well,...let's get to the point,... the point is that many times, to avoid issues and simplify, we need a full Linux system and, if our server is based on Windows, the only way of having it is through a virtual machine. At least till WSL2 in Windows is released, but that will be another story and sure it'll take a bit of time to become robust enough.
In this article, I'll tell you, step by step, how to install an environment where you'll be able to work, if you need it, with Docker containers on an Ubuntu system in your Windows server. Let's go...
If you work with Portal on multiple instances of Caché, Ensemble or HealthShare you might find it useful to set the System Mode of the various instances, so as to give yourself a visual reminder of the role of the one you're currently working on.
For instance:

Greetings all,
Need to connect your VSCode to an InterSystems Server?
Heard of this option?
.png)
Testing ECP-based applications often take quite some effort for setup and preparation.
I have created a Docker-based workbench that allows you to have it quick at hands.
And if you crash it? You just give your containers a fresh start.
The whole setup runs code-based during the start-up of your instance.
In that sense, it is also a portable coding example using ZPM and the objectscript-docker-template
In Studio you could open a class directly via it's name, without having to traverse the package tree with multiple clicks until arriving at the desired class.
You would Ctrl + O or (File -> Open) and be able to simply type in the class name, for example:
.png)
You press Enter, and viola - the class is opened.
How do you achieve this in VSCode?
I finished my participation in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during this the training final day. Tips presented in the day 5:
Hi folks!
Just a very short note on if you want to add a cute Open Exchange shield like this:
in your GitHub repo you can do it by entering one line like this:
[](https://openexchange.intersystems.com/package/csvgen)
In the URL place the path to your OEX page.
Thanks to the participants of contest for such a neat shield )
What other helpful Github shields do you know? Please share in the comments?
One of the leading benefits of ObjectScript is the speed and efficiency it allows for an experienced developer. Let's look at an example of how you can benefit from ObjectScript today.
Suppose you have a class that stores the names of your users. We'll call the class Data.User, and give it a string property Name Next, we will need a method to create a new user or update an existing one.
The question has come up several times and I saw mixed answers and no quick example
My personal preference is using CPIPE device as you get back exactly the output you will get at the command line interface of your OS .
The tricky thing is to stop reading in time.
The example just displays what you normally see in your console.
it becomes useful if you look for things that you can't get from any $system.whatever()
e.g.
- your servers IP address or addresses depending on your configuration.
Let's imagine you have to implement a method with a definition
/// Set value to %session.Data
ClassMethod setValue(params...) As %Status
{
}How it should work
do ..setValue("key1", "val")is equal to
set %session.Data("key1") = "val"and
do ..setValue("key1", "key2", "key3", "key4", "val")is equal to
so, quite simple, any amount of arguments, while the latest one is a value, and any previous is an index, should accept at least 2 arguments.
How would you implement this method?
In this article, we'll talk about an application that I use every day when monitoring applications and integration solutions on the InterSystems IRIS platform and finding errors when they occur.
While looking for a solution for logging object changes in InterSystems IRIS, Ensemble, and Caché DBMS, I came across a great article about logging with macros Inspired by the idea, I forked the project the paper had described and adapted it to some specific needs. The resulting solution is implemented as a panel subclass, %CSP.Util.
You might have encountered this and not known how to prevent it, or perhaps not even noticed it...
Hi Community,
I shared my experience working with FHIR for the first time in this article.
In that article, I wrote how I explored the FHIR Resources and talked about the information that I found useful in FHIR documentation.
The first version of my app only shows the information that FHIR Resource provides.
I wanted to make the user able to update the patient details, so I to search for an example of how to do it.
The Github page of fhir.js has an example of how to update a resource.

Looking at this example made me think that it was effortless.
During my search for a snapshot of a persistent object,
I met a feature that I would like to share as it could be useful in some special situations.
My trigger was to have a before- and an after-image during unit testing.
IRIS and Caché / Ensemble offer the possibility to add Languages Extension as SystemFunctions, SystemVariables, SystemCommands
The related documentation tells you where to add the system-wide extension. Parameter passing is not covered explicitly.
In this article I'd like to share with you a phenomena that is best you avoid - something you should be aware of when designing your data model (or building your Business Processes) in Caché or in Ensemble (or older HealthShare Health Connect Ensemble-based versions).
Hi, Community!
Would you please share your best practices for utilising 3rd party modules (say community solutions, frameworks, development tools/utils).
There are two approaches which I like:
1. New namespace for every new module
So, if you install something you install it in special separate namespace/database. MDX2JSON/DeepSeeWeb case.
If the package is intended to be used in other namespaces, map the packages to %All and have it available in all the namespaces in this Caché/Ensemble.
And there is one more benefit: it is easy to uninstall the module, just delete the namespace/database.
2.
Note (October 2022): yape has been deprecated and replaced by YASPE, there is no more development on yape.
Note (June 2019): A lot has changed, for the latest details go here
Note (Sept 2018): There have been big changes since this post first appeared, I suggest using the Docker Container version, the project and details for running as a container are still in the same place published on GitHub so you can download, run - and modify if you need to.
Allow limited durability for demo and development IRIS-Docker-micro-Durability During development of a container based demo I found the need to access a fresh docker
an instance of IRIS image (e.g intersystems/iris-community:2020.2.0.199.0) over and over.
To bypass loading my code repeatedly, I developed this workaround.
The principle of a persistent IRIS database outside the container is unchanged.
But now the whole setup is moved into Dockerfile and docker-compose.yml
Make sure you have git and Docker desktop installed.
This error is sometimes seen while viewing a listing in InterSystems IRIS Business Intelligence:
ERROR #5540: SQLCODE: -99 Message: User <USERNAME> is not privileged for the operation (4)
As the error suggests, this is due to a permission error. To figure out which permissions are missing/needed, we can take a look at the SQL query that is generated. We will use a query from SAMPLES as an example.
SELECT TOP 1000 %ID, DateOfSale, Outlet->City, %EXTERNAL(Channel) AS Channel, Product->Name AS Product, UnitsSold, AmountOfSale AS Revenue, (Discount * 100) || '%' AS Discount, Comment FROM HoleFoods.
Preview Mode was added to InterSystems IRIS Business Intelligence to give designers a quick view of what their resulting Pivot Table will look like without needing to wait for the results to fully execute. This can be beneficial when designing pivot tables because if you are dragging and dropping elements to see how they look/work in your pivot table and seeing if they have the desired data. Since you are exploring and designing, you don't necessarily care about the results at the moment, but you would still like to see how your table looks with the changes you have made.
Do you ever have the desire to optimize your code as much as possible?
Do you have any cases where every nanosecond matters?
Do you use If statements?
This quick tip can help your code run slightly faster with no additional code.
%SQLRESTRICT is a special %FILTER clause for use in MDX queries in InterSystems IRIS Business Intelligence. Since this function begins with %, it means this is a special MDX extension created by InterSystems. It allows users to insert an SQL statement that will be used to restrict the returned records in the MDX Result Set. This SQL statement must return a set of Source Record IDs to limit the results by. Please see the documentation for more information.
This is useful because there are often times users want to restrict the results in their MDX Result Set based on information that is not in their cubes. It may be the case that this information may not make sense to be in the cube. Other times this can be useful when there is a large set of values you want to restrict. As mentioned before, this is not a standard MDX function, it was created by InterSystems to handle cases were queries were not performing well or cases that were not easily solved by existing functions.
Does anyone NOT use a debugger? I can't remember the last time I did. It's not because I don't dislike them, I just don't need to use them. The main reason for this is because I have a certain development methodology that either produces less bugs, catches them at a unit test level, or makes tracking them down much easier.
Here are my tips...
1. Write your own COS cheat-sheet.
This is mainly for anyone that is new to COS. One of the biggest bug hazards is not knowing how certain commands and functions work.