Question Abraham Wasswa · May 1, 2022

Given I have a property 

Class All.AllBooks Extends %Library.Persistent
{

Property ID As %Integer;

Property Title As User.Book;

}

 

In the class method

ClassMethod GetABookById(id As %Integer) As %Status
{

SET MyBooks = ##class(All.Allbooks).%OpenId(id)

SET obj = {

     "ID" : (MyBooks.%Id())

     "Title" : (MyBooks.Title)

}

WRITE obj.%ToJSON()

Quit 1
}

 

How do Access the foreign key in JSON() data

7
0 680
InterSystems Official Bob Kuszewski · Apr 30, 2022

InterSystems is pleased to announce the release System Alerting & Monitoring (SAM) version 1.1.

What is SAM?

SAM marries IRIS’s standards-based Monitoring API and Log Monitor with familiar industry standard tools like Grafana and Prometheus to create a basic monitoring and alerting solution for IRIS clusters.

For more on SAM, see the System Alerting and Monitoring Guide.

What’s new in SAM 1.1?

3
0 469
Question Matjaz Murko · Apr 30, 2022

Hi.

I'm trying to serialize property of type %TimeStamp in SQL statement with JSON_OBJECT, but I get a raw string instead of JSON DateTime format string. %JSONExport method on the same object works fine.

Any ideas?

Regards,
Matjaž

3
0 321
Article Robert Cemper · May 1, 2022 2m read

If one of your packages on OEX receives a review you get notified by OEX only own YOUR package.   
The rating reflects the experience of the reviewer with the status found at the time of review.   
It is kind of a snapshot and might have changed meanwhile.   
Reviews by other members of the community are marked by * in the last column.

I also placed a bunch of Pull Requests on Github when I found a problem I could fix.    
Some were accepted and merged, and some were just ignored.     
So if you did a major change and expect a changed review just let me know. 

2
0 246
Question Ruiyan Yu · May 2, 2022

Hi,

Doc: classMethode DecimalToHex(decimal As %String) as %String
Converts a decimal string to a hexadecimal string.

w !,$System.Util.DecimalToHex(42) > 2A

w !,$zhex(42) > 2A

w !,$System.Util.DecimalToHex(0) is empty

w !,$System.Util.DecimalToHex("0") is empty

w !,$System.Util.DecimalToHex("00") is empty

w !,$zhex(0) > 0

Is the empty string really the intended output?

Best regards

RY

1
0 251
Question Abdul-Rashid Yakubu · Mar 22, 2022

Hi,

Is there a way to find the median in Intersystems Cache SQL? I know it is not available as an aggregate function. Also in SQL Server I could try something like: 

SELECT
(
 (SELECT MAX(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score) AS BottomHalf)
 +
 (SELECT MIN(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score DESC) AS TopHalf)
) / 2 AS Median

However, there is no PERCENT Keyword in Cache as well. Any suggestions?

Thanks

4
0 459
Discussion Lexi Hayden · Apr 28, 2022

InterSystems has always provided -- with each maintenance release -- a document that describes all the changes in that maintenance release. This document is known informally as the relnotes or (now) the MRNotes*. Here’s a link to one of them, just to make sure we’re on the same page: https://docs.intersystems.com/iris20211/csp/docbook/relnotes/index.html

Could you please comment here and tell us if you use this document and how you use it and what you use it for?

1
0 268
Announcement Dean Andrews · Apr 4, 2022

We are excited to introduce you to our new feedback portal, InterSystems Ideas!

We aim to improve our feedback mechanisms so that you can suggest ways our products could evolve to meet your business challenges. Developer Community Questions are a great way to interact with your peers around a specific coding issue, and Customer Support is, as always, the way to get an immediate problem fixed.

3
1 533
Question Brandon Butler · Apr 27, 2022

Has anyone here successfully connected to a community edition version of IRIS through port 22 to localhost? I have been trying for hours and hours to connect a Mobaxterm terminal session to IRIS and am at a total loss. Im not sure if port 22 isnt opening at this point or if its a configuration issue on my part. I am seeing either "Remote side unexpectedly closed network connection" or "connection refused" when i try to run the SSH session. I have tried 22/51773/1972 etc port settings under add/edit server to no avail. Any help is appreciated. Thanks.

Mobaxterm settings

1
0 858
Article Mario Sanchez Macias · Apr 27, 2022 3m read

From time to time, we get the previous question in support, something or someone is using more licenses than expected, and we need to find what. 

We have two scenarios. The first scenario is when we realize that the licenses are exhausted when the application does not work or when we try to connect through the terminal and get the "lovely"

<LICENSE LIMIT EXCEEDED> message: 

1
0 981
Question Charles Me · Apr 27, 2022

Hi,

I am not able to connect to the local web browser.

If I try to open documentation (http://localhost:57772/csp/sys/UtilHome.csp) I get

Caché Server Pages Version 2018.1.6.717.0
Server Availability Error

Server is currently unavailable

If I call up the log CSP.log I have the following:

Access Denied
    Diagnostic
    Failed to connect to 'LOCAL' - Reason: 0 (Connection successfully made but server not responding) (No Retry)

I cannot figure this out

8
0 1407
Announcement Angelo Bruno Braga · Apr 25, 2022

Hi Community,

Our 1st InterSystems Portuguese Tech Article Contest ended. We received several interesting content in: 6 amazing articles 🔥

A great thanks to all that participated on our competition !

And now it's time to announce the winners .... 

Meet the winners of the 1st InterSystems Portuguese Tech Article Contest and their amazing articles:

5
0 270
Question Nezla · Apr 27, 2022

Hi guys,

We have created a utility to allow users to create a System task for a list of items the same way it’s done via SMP (attached below), the problem is that there may items and those systems tasks will grow a maybe exceed a couple of thousands so :

  • First, what the maximum of scheduled system tasks we can have ?
  • Then, is there a better way we can do this without having a big list of system tasks ?
  • FYI, the system should be able to have a different scheduling times & intervals for each item
1
0 290
Question Michael Lundberg · Apr 26, 2022

Hello

We have a solution with an EnsLib.EMail.InboundAdapter as services that scan a mailbox on incoming mail with attachments.

When a new email arrives, the service sends the request (with a property %Net.MailMessage) to the process. In the process, we try to loop through and retrieve part 2 which we assume is the file.

set Part = pRequest.Mail.Parts.GetAt (2)

We can read out the file name:
Set FileName = Part.FileName

But how, and is it possible, to save the attached file to disk drive?

I do not see any method that supports that in that class.

Or must we use% Net.POP3 to receive and store the file?

4
0 421
Question Nezla · Apr 26, 2022

Hi guys,

I have a %Time filed with (Format=1) to allow showing hh.mm.ss and the field is showing fine in display mode eg:

 

it should show 00:07:30  but the seconds are cut off from it as below :

any ideas pls?

thanks

8
0 329
Question Nicky Zhu · Apr 25, 2022

Hi guys,

How to find out the number of active connections (including SQL, http, tcp and all remote connections) of an IRIS instance? A core based license is used.

I've checked the document and find %SYS.ProcessQuery.

I'm currently using this sql:

select count(distinct Pid) From %SYS.ProcessQuery
where ClientIPAddress is not null
and ClientIPAddress <> '127.0.0.1'
and ClientIPAddress <> 'localhost'
and IsGhost = '0'

Is it accurate or do we have a better option?

Thanks in advance.

4
0 450
Question Kevin McGinn · Apr 26, 2022

I wrote this COS script that I can run in a terminal session to get a view of the cache users:

set hdl = ##class(%Library.ResultSet).%New()
set hdl.ClassName = "Security.Users"
set hdl.QueryName = "Detail"
set sc = hdl.Execute()

while hdl.%Next() { do hdl.%Print() }

I know this is a bit rudimentary  but this seems to be the correct script to get users. But looking at one of the clients AIX based instances there are about 3900 users. But this script returns no results. In fact, after the execute if I issue "w hd.%Next()" it returns 0. I look at "Do DisplayError^%apiOBJ(sc)" and the message is:

4
0 314