Iryna Mykhailova · Jan 19, 2024 go to post

Oh, wow! It's so cool to be recognized not in 1 but 2 nominations! Congratulations to everyone!

Iryna Mykhailova · Dec 30, 2023 go to post

Congratulations to the winners! Well done! Hope you had fun doing all the daily challenges!

Iryna Mykhailova · Dec 26, 2023 go to post

I'd agree with @David Hockenbroch - if you have a UI, you will most likely find it easier to work with a csp page like a usual html and all that. But if you don't have a UI (or it's super simple), then you would create a cls file and extend the %CSP.Page.

Iryna Mykhailova · Nov 30, 2023 go to post

It's a shame, I feel like there is often something going on with Cloud SQL. Especially during contests 😄 That's why I don't feel confident to incorporate it in my course 😢 - I ask my students to use it and then they can't even set it up without a fuss.

Iryna Mykhailova · Nov 17, 2023 go to post

The command doesn't know. That's why you need to check the SQLCODE variable.

If SQLCODE  = 0 then the row exists and it was updated. If SQLCODE  = 100 then the row doesn't exist. If it not equal to either then you have a problem.

Example for Embedded SQL:

 &SQL(update WH.Size
   set Height = 1000
 where %ID = 10)
 write SQLCODE

Example for Dynamic SQL:

 SET myquery = "update WH.Size set Height = 1000 where %ID = 10"
 SET tStatement = ##class(%SQL.Statement).%New()
 SET tStatus = tStatement.%Prepare(myquery)
 SET rset = tStatement.%Execute()
 write rset.%SQLCODE

Not sure what you mean by "if the row exists" in regards with insert. The row does not exist, because you're creating it.

Iryna Mykhailova · Nov 14, 2023 go to post

I'd say in general, having a structured data with the actual names of fields is much better than "parsing" the text with delimiters. So I would vote for FHIR. Maybe at some point there will be a better way to represent data - and it is OK - and people will switch to it. The main idea - not to make it painful on the developers to rewrite everything!

Iryna Mykhailova · Aug 25, 2023 go to post

I know, but it's not a question of examples, it's more a question of appreciation. There was another one interesting quiz question that actually prompted me to write this idea, I just don't remember what it was about. So, I think it would bring pleasure to authors of quiz questions to see that others like their work.

Iryna Mykhailova · Aug 24, 2023 go to post

Yep, that was my first thought - can you change Property Organizations As list Of Organization; to parent/children Relationship? In this case you will get automatic cascade delete. You'll have

Relationship Responce As GetOrgUpdatesResponse  [ Cardinality = parent, Inverse = Organizations ];
Relationship Organizations As Organization [ Cardinality = children, Inverse = Responce ];

And it suggests that each responce has its own organizations objects that don't repeat.

Otherwise, you will have to delete them manually 1 by 1 in callback method %OnDelete for example

/// This callback method is invoked by the <METHOD>%Delete</METHOD> method to 
/// provide notification that the object specified by <VAR>oid</VAR> is being deleted.
/// 
/// If this method returns an error then the object will not be deleted.
ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status [ Private, ServerOnly = 1 ]
{
	Quit $$$OK
}

Iryna Mykhailova · Aug 16, 2023 go to post

Can you open in your browser the address that you have in parameter LOCATION of your class that extends  %SOAP.WebClient? You should at least get an error "Invalid action" if your SOAP server is created in IRIS.

Iryna Mykhailova · Jun 27, 2023 go to post

In IRIS there are no built-in constructors. Classes that don't inherit from a system class are usually used as storage for class methods.  Therefore, if you want to create an object you need to inherit your own class from one of the system classes, like %RegisteredObject (won't save your objects to the database), %SerialObject (won't save your objects to the database on its own), %Persistent (will save your objects to the database) etc. For example:

Class Sample.Header extends %Persistent
{
Property Key As %String;
Property Show As %Boolean;
}
Iryna Mykhailova · Jun 14, 2023 go to post

You're not executing it:

vism1.Execute(cmd);

To make it shorter, can be

vism1.Execute('$$Check^logininput()');
sResult:=vism1.Value;

You can also find an example in this GitHub repository.

Iryna Mykhailova · May 17, 2023 go to post

For me it's a horrible news 😭 I really prefer to use Studio when explaining how to create properties (particularly relationships) and queries (particularly Class Queries based on COS) to students who see IRIS for the first and the last time during my classes. And when something goes wrong (and it does a lot of the time) it's usually easier to ask them to delete the code that produces error and rewrite it while I'm looking than to figure out what's wrong with it. And if it something more complicated than simple properties it can take a lot of time.

Besides, not all students know (and want/need to learn) how to use VS Code and look for proper plug-ins, extensions etc. It will really make my life that much harder.

Iryna Mykhailova · May 10, 2023 go to post

This is a great opportunity to take and exam for free in a nice friendly setting. Therefore, I would definitely recommend using this opportunity.

Iryna Mykhailova · Apr 28, 2023 go to post

From what I understand in the article, in Caché 5.0 and earlier versions the modern Management Portal is called System Management Portal.