Greetings all,
Need to connect your VSCode to an InterSystems Server?
Heard of this option?
.png)
Pieces of experience in InterSystems Technology which solve some particular problem in elegant or unusual way.
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
set %session.Data("key1", "key2", "key3", "key4") = "val"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.
In the previous part of this series, we saw how to define a basic portlet. Now we will look into making this portlet reference a web page that will enhance our dashboard experience.
In this example, we will be embedding a Developer Community article along side a couple of widgets displaying information related to the number of views on the Developer Community articles. This example is not hosted on the Community Analytics server, but if it was we could see the view counts going up as we interacted with the page.
In a real case, perhaps you have an embedded page from an external web site showing the current Emergency Room wait times for Hospitals in your area. This portlet can be used along side widgets from your Emergency Room showing how many people are waiting, how many doctors are active, and how many people are being treated. As other Emergency Room wait times grow, you can possibly expect your volume to increase as well. This can help you make decisions on how to allocate resources.
The simple answer is: a custom widget. A portlet can exist by itself on a DeepSee dashboard, it can be used along side standard DeepSee widgets, or along side other portlets. The rendering of the custom widget is completely user defined. This means you can embed a web page, create a form to perform any sort of action needed based on the data on your dashboard, use third party charting libraries, or simply display data from outside of a DeepSee cube.
¡Hi everybody!
As you likely are aware, the new version of InterSystems IRIS for Health (I4H) it's already available in Docker Hub. It's the Community version and is free and fully functional. There have been comments about it in other articles and posts,... so today I won't add anything about features. Here I want to explore "the mistery about the disappearance, or better, absence of our persistent data when we run a container with the durable option" (I didn't find a terrifying font to emphasize the thriller... post editor is not terrific for styling
) .
Hi,
It turns out that on windows if you run a command with a windows command file you need to escape the % character as %%
In my case I could test freeze and thaw calls at the command line successfully as
..\bin\cache -s. -U%SYS ##Class(Backup.General).ExternalFreeze()
...but when my freeze script ran it would fail.
it turns out that a single '%' is striped when run in a windows command file, and it must be escaped as '%%' windows gets:
..\bin\cache -s. -USYS ##Class(Backup.General).ExternalFreeze()
So make sure your freeze and thaw scripts and include a double %%;
Today, I was reading some source code, and encountered the following method signature:
Method SendRequestSync(pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent)And I immediately thought, why is there a ByRef?
Every developer has made the mistake of accidentally leaving temporary debug code in place when they meant to remove it after debugging is complete. The great thing about writing in ObjectScript is that there is a way to make temporary code be truly temporary and automatically self-destruct! This can also be done in such a way that the code has no change of making it into your source control stream, which can be helpful as well.
The secret to this lies in making use of the "Intermediate code" (.INT) which is generated when you compile classes (.CLS), routine code (.MAC) or CSP pages (.CSP).
One of my colleagues at InterSystems encountered an unexpected issue when running InterSystems IRIS on a Macintosh in a container using Docker for Mac. I’d like to share what we found, so you might avoid running into similar issues.
The Problem
The task at hand was running a Java application with XEP to do a large data load into IRIS. When running the data load, the write daemon hung soon after starting the job, with messages like these in messages.
This article will provide tips and tricks on customizing Ensemble business hosts with configurable settings.
Ensemble production Settings are configurable values that control the behavior of a production and its hosts.
The documentation for adding and removing Settings and specifying categories and controls for Settings is provided at the link:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?