I know that collection is instance of %AbstractList.
But what about $listbuild? Does it possible to detect that given variable is instance of $lb?
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.
I know that collection is instance of %AbstractList.
But what about $listbuild? Does it possible to detect that given variable is instance of $lb?
Hi Community!
The registration phase for InterSystems Online Programming Contest ends today and we will start the voting week!
Now we have 20 applications - so you have a set of applications to choose from!
How to vote?
This is easy: you will have one vote, and your vote goes either in Experts nomination or in Community nomination.
This code snippet changes all passwords in a system to a specified string. The two literal strings at the beginning of the snippet can be adjusted to edit the system or password string. The class method "test" runs the code:
Class eduardlebedyuk.changePasswords Extends %RegisteredObject
{
ClassMethod test()
{
set ns = $namespace
zn "%SYS"
set NewPass = "NewPassString"
set rs=##Class(%ResultSet).%New("Security.Users:List")
set st = rs.Execute()
while rs.Next() { set st=$SYSTEM.Security.ChangePassword(rs.Get("Name"),NewPass)}
zn ns
}
}
(Originally posted on Intersystems CODE by @Eduard.

DISCLAIMER: I am not an InterSystems engineer or a professional ObjectScript developer.
I just want to share my opinion about some things I am really miss in ObjectScript.
I really appreciate everyone who support my project (Declarative ObjectScript) in contest
but the post is not about "why you should support me" on contest.
I faced with ObjectScript in the university while was working on my diploma (in 2013).
Very good mentor @Evgeny Shvarov helped me to get started with ObjectScript development.
Hey Developers,
New "Coding Talk" video was specially recorded by @Maks.Atygaevfor the IRIS Programming Contest:
Hello,
We have been reasearching how could we parse a string with a JSON structure like the following:
{"code":200,"type":"Consulta","message":"Operacion correcta","result":[{"id":38802130,"paciente":null,"prestacion":{"codigo":"1.
The common requirement in many applications is logging of data changes in a database - which data has changed, who changed them and when (audit logging). There are many articles about this question and there are different approaches on how to do that in Caché.
I'm sharing a mechanism that can help you implement your framework to track and record data changes. This mechanism creates a trigger through an "objectgenarator" method once your persistent class inherits from the "Audit Abstract Class" (Sample.AuditBase). Since your persistent class inherits Sample.
Hello,
We are developing a method to take two messages which have a list of data types. It is being defined as:
{
Property informacion As EsquemasDatos.HistoriaClinica.Informacion;
Property datos As list Of EsquemasDatos.HistoriaClinica.ConsultaCitas;
Property error As EsquemasDatos.HistoriaClinica.Error;
}
Inside datos we have:
Hello,
We are developing a Transformation and we are wondering: how could we debug and show a XML message which is being an output from a transformation, without storing it into request/response/callrequest/callresponse? We mean, how could we show a context variable in the production?
For example, let's have a transformation which stores an appointment in a variable called: context.especializadasConFormatoPrimarias
How could we show in the Production?
Hello,
We have a tranformation where we would like to convert a date from the following format:
"'dd/mm/yyyy' 'hh:mm'" (double quotes are just visual to indicate this is a string)
to date and time separated:
date: dd/mm/yyyy
time: hh:mm
We have already splitted the datetime into date and hour as follows:
set fechaHora = source.result.GetAt(indice).We have a data transformation where source is object collection (populated from a json file) and target is EnsLib.EDI.XML.Document.
If source file is large enough, transformation fails and we get <store> error and I quickly found this:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_DTL_foreach which at the bottom in "Avoiding <STORE> Errors with Large Messages" section tells to:
"As you loop over segments in a message or object collections, they are brought into memory.
Hey Developers,
New "Coding Talk" video was specially recorded by @Evgeny.Shvarovfor the IRIS Programming Contest:
⏯ How to Create and Submit an Application for InterSystems IRIS Online Programming Contest 2020
Hi Developers!
In March we are starting our first InterSystems IRIS Programming Contest! It's a competition in creating open-source solutions using InterSystems IRIS Data Platform.
The topic for the first contest is InterSystems IRIS, Docker and ObjectScript!
The contest will last three weeks: March 9-31, 2020.
There will be money prizes for Experts Nomination - winners will be determined by a specially selected jury:
🥇 1st place - $2,000
🥈 2nd place - $1,000
🥉 3rd place - $500
Also, there will be Community Nomination - an application that will receive the most votes in total:
🏆 1st place - $1,000
And we provide winners with high-level badges on Global Masters.
Hi,
I know there are several alternatives, but I would like to find the easiest & simpler ones to store data coming in Json format from post requests and also allowing me to do SQL queries.
I want to have a property called favouriteColors. I want to store a few colors, and I want to be able to do queries to get top favorite colors, etc.
The client part of the code for this game is on the MS Excel sheet and consists of:
The server part of the code (vmx.ro) is installed onсе, it not change depending on the task, is the same for IRIS, CACHE, 16, 8-bit encoding, any applications, games, reports. The server side creates and maintains ‘virtual excel’ in M.
Looks like the $get is actually trying to use the property getter instead of evaluating the GetAt as a method first.
Should this be considered a bug?.png)
The Trace value gives 32,000. But the Read() method of the %Stream.Object class specifies 32,656 by default.
Why ?
Best Regards.
Hi developers!
Suppose you have a Github repository with ObjectScript classes but without a Docker environment.
Recently I published a repository with a set of files that form a universal Docker and VSCode environment to let you either import and run your repository in InterSystems IRIS Community Edition on Docker or turn your repository into Docker and VSCode environment for InterSystems IRIS Community Edition.
So in one sentence:
Unpack these files in your folder and you have the Docker and VSCode environment for your InterSystems IRIS ObjectScript application!
See the details below.
Hi Community!
New "Coding Talk" video is already on InterSystems Developers YouTube:
⏯ How to Enable Docker and VSCode to Your InterSystems IRIS Solution
There does not seem to be any separation between the error code and error text in a %Status object. For custom errors, I simply want to display the message and not Error #5001: Some error text.
We would like to be able to store accented characters into an API.
Currently our Rest Operation is the following:
{ Parameter INVOCATION = "Queue"; Method CrearNotificacion(pRequest As Mensajes.Request.NotificacionesPUSH.CrearNotificacion, pResponse As Mensajes.Response.NotificacionesPUSH.CrearNotificacion) As %Library.Status
{
Set body = {
"app_id": (pRequest.idApp),
"headings": {"en":(pRequest.notificacion.titulo),"es":(pRequest.notificacion.titulo)},
"subtitle": {"en":(pRequest.notificacion.
We need to get service's both source and target names. We have checked that we could obtain them in the service:
However we would like to get it directly from the BPL. We have tried:
$$$LOGINFO("SourceConfigName "_SourceConfigName)
And the compiler outputs:
How could we access to %PrimaryRequestHeade
I am new to Intersystems cache COS scripts (cache is a client system). ThoughCOS scripts basically appear to be straight forward, I am having issues with the logon credentials. From what I have found in the documentation, the first 2 lines of the script contain the U/P. When running the script, the username is picked up correctly but the password is not. Granted, having U/P in a script is not ideal but will suffice as a matter of learning if I can figure out the formatting/syntax required. Any help on this would be appreciated.
Kevin McGinn
Hello,
we are trying to figure out if there's a way to create a SOAP Envelope by using SOAP classes.
Right now we use a string to define the envelope element.
The string looks like :
Ladies and gentlemen, good news for our town.
It finally happened - M was put in the cell.
And feels great there. Maybe it not a prison but an Excel cell.
Being there, he leads the whole M-gang. As well as conditional formatting in EXCEL.
Close integration of excel with the database provides a new convenient design tool.
Interactive reports, input forms, diagrams are generated only by m-commands in cells, without classical programming.
More detailed on https://github.com/mx-alex/MX
We will monitor the development of the situation and answer your questions.
best wishes
Alex
There is a special Query for reporting, it takes one cell of Excel. Example :
?$$omQuery 113^oPeat | Country Country:Province Date Product:Date Date:Product:-zr | tn EURO | zrzr| | if Date'<%XD81,Date'>%XD82 | set zrzr=zr,EURO=summa
The omQuery sets the structure and content of the required documents as well as filters and data processing procedures.
In one request, up to 9 reports are created, with subtotals by group.
If you had the opportunity to change something in the IRIS Interoperability Message Viewer, what would you do?
Our company is in the process of converting our software for use in Intersystems IRIS and one of the major sections of the software makes use of a custom statically-linked C library using the $ZF("function-name") functionality. During this, I found out that the process for setting up the C library to be used within the database platform has changed significantly between Cache and IRIS.
Hi developers!
Just want to check with you on best practices for that.
You collaborate for InterSystems IRIS repository. You fork it, then make changes, commit, push, pull request, discuss(if any), your PR is accepted.
What's next?
Do you delete the repository you forked in?
try{
....
....
....
Set tSC = method_invocation()
If $$$ISERR(tSC) {
Quit tSC
}
....
....
....
}On compiling the above, I get an error saying "QUIT argument not allowed : 'tSC' ".