What it the best method to call an object without ID but having RowID
SET task.Title = ##class(RESTAPI.TITLE).%OpenId(obj.Title)
I have tried using %OpenId() but it returns null
Any help would be grateful thank you.
InterSystems Caché is a multi-model DBMS and application server. See more details here.
What it the best method to call an object without ID but having RowID
SET task.Title = ##class(RESTAPI.TITLE).%OpenId(obj.Title)
I have tried using %OpenId() but it returns null
Any help would be grateful thank you.
I am sure I came across this in the past with Cache and just saw this again in IRIS.
When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.
For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.
No Database settings are changed and it is all done with either IRIS down or the databases dismounted.
Hi
Does anyone know where the user generated code resides, the stuff one might write for a production, I presume it lives in a table somewhere within a database?
Basically, I want to do some dependency analysis of what I've written - find out what's in use, how it's referenced, etc. I know I can export it to an XML file and work on that, but direct access on a table would be quicker for me.
Cheers
Hi,
Doc:
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
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
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
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:
Hi Team,
I am Working on one data transformation, In the data transformation the data transformation data needs to be saved in the globals.
Can you please help me to save the data into the globals in a Persistent class.
Thanks in advance
Hi All....
its possible get all extended classes from abstract class?
Could someone tell me a method that does this? or will I have to implement something by reading the data dictionary?
I am use cache 2018
A question has come up that I am not finding the answer for.... Does the daily purge process re-index EnsLib.HL7.SearchTable or other SQL tables? In looking at the purge process documentation I am not seeing anything that mentions EnsLib.HL7.SearchTable. Do we have to manually constantly re-index tables that we create? For example I created another search table based off of EnsLib.HL7.Search table, will I need to constantly watch this as it grows? How do tables get index, is there some kind of mechanism that automatically does it, or are we responsible for indexing tables ourselves? We are
I am referencing the documentation here: https://docs.intersystems.com/ens201815/csp/docbook/DocBook.UI.Page.cls…
I have embedded html within a <script language="cache" runat="server"> block. Within that I'm defining and using a macro, but it doesn't display at all. Something like:
<script language="cache" runat="server">
s stringData=obj.data
#Define displayString stringData
&html<
<p>$$$displayString</p>
>
</script>Hi,
i have made a testing package (name "test.a") and want to move it now into an other new package (f.example work.a)
is that possible?
Michael
When looking at the "Current License Usage Summary" web page, there is a line for both local and distributed "Maximum Connections". I have scrutinized every class that seems reasonable to contain this information but have found nothing that matches the values on the web page. I do not believe these are related to license specifically though I did review all of the potential attributes of the license related classes to no avail.
Hi,
I have wrote an article about how to install the intersystems cache driver in a Docker container, and then deploy it using Azure Functions:
How to run a (Python) Azure Function as a Docker container & Deploy it using Bicep | Victor Sanner
This might be useful to others, especially the dockerfile which I have copied below. This builds a debian docker container and installs the Intersystems Cache driver, which python can then use :)
Working with CSP applications, I've noticed behaviour that does not seem to be documented anywhere.
We have a requirement to write to an AWS S3 bucket from Cache.
We haven't upgrade to IRIS yet, but are looking at doing so in the future. This requirement cannot wait for the upgrade to happen, unfortunately.
Will appreciate if any one can share any example code, that enables cache to write to an AWS S3 bucket?
I am writing a Python tools I want to access the %Monitor.System.License properties:
Initially I want to develop Objectscript to verify access to the properties. But I can not figure the proper syntax.
I first attempted:
set ans = ##class(%Monitor.System.License).AvailableDist
which failed.
I tried another approach:
set ans = ##CLASS(%Monitor.System.License).%GetParameter("AvailableLocal")
Hi Team,
I am working on data transformation ADT^A01 from ADT^A01 ,In both source and target MRG segment is not available. How can i create a new MRG segment in Target. Kindly share your ideas how to create a new segment in Data transformation.
Thanks in advance
I want to store data in an index global without defining an index in an inherited class.
Example:
Class Aclass [ Abstract ]
{
Index TXSBI On TextSearch(KEYS);
Index TXSSI On TextSimilarity(KEYS) [ Data = TextSimilarity(ELEMENTS) ];
Property TextSearch As %Text(LANGUAGECLASS = "%ZText.Czech", MAXLEN = 1000, XMLPROJECTION = "NONE");
Property TextSimilarity As %Text(LANGUAGECLASS = "%ZText.CzechSim", MAXLEN = 1000, SIMILARITYINDEX = "TXSSI", XMLPROJECTION = "NONE");
...
//other codeClass AAclass Extends (%Persistent, ClassType.SuperClass, Aclass, Bclass...)
{
}MAXSTRING (longstring) is enabled.
We have a Class containing a property definition
Property SettingsJSON As %Text(MAXLEN = 3600000)
The property is used for storing a string of JSON data however in some cases we get a Cache error: %SaveData error when trying to save a string of JSON a lot less than maximum "allowed" length, any ideas anyone?
Hi Community,
This post is a introduction of my openexchange iris-globals-graphDB application.
In this article I will demonstrate how to save and retrieve Graph Data into InterSystems Globals with the help of Python Flask Web Framework and PYVIS Interactive network visualizations Library
Hello,
I'm currently working on a custom version control implementation.
I'd like to show differences between a copy of a previously saved routine as a merge of the ^ROUTINE Global and the current version of that same routine.
I've found legacy Documentation for %RCMP which does the trick in the terminal but I'd like a similar result stored inside a variable.
I also want to show differences, not only see if they are the same or not.
The management portal has that exact feature, so maybe someone can direct me to the function that is being used there.
Hi!
I'd like to know if there are any issues if an index is inserted into a table without running the %BuildIndices() method.
It's important to note that data inserted before the index is not important for retrieval, so it's not a problem data inserted before the index don't show up in queries.
The reason why I'm asking this is that I'd like to avoid index reconstruction on big tables which I need to inser such index.
I'm using Cache 2018.1.
Thanks,
José
Hi Community,
I have below embeded sql query in object script class
&sql(SELECT count(ID) into :suspendedCount FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5')
resulting 1095 into suspendedCount
but same query executed in SQL explorer
SELECT count(ID) FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5'
resulting 0
but once i changed where condition Status='5' to Status='Suspended'
The documentation suggests this method for calling server side methods via SUBMIT: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…
Following that, the form I'm submitting needs to validate the dates entered (the startDate isn't past the endDate).
Trying to keep everything in the .CSP file, I add a tag:
<script language="Cache" method="Validate" arguments="startDate:%Date,endDate:%Date">
I'm able to validate the dates here, but not matter what I do (quit, return false, redirect) the code that runs on the SUBMIT goes:
We've been tasked with developing a file upload module as part of our wider system, storing scanned documents against a patients profile. Our Intersystems manager suggested storing those files in the DB as streams would be the best approach and it sounded like a solid idea, it can be encrypted, complex indexes, optimized for large files and so on. However the stake holder questioned why would we want to do that over storing them in windows folders and that putting it in the DB was nuts. So we were wondering what everyone else has done in this situation and what made them take that route.
Hi Team,
I would like to save the array subscript with in double quotes
eg sub1=111,sub2=444 (these values are dynamic)
set array(sub1,sub2)=""
It will be saved as array(111,444)=""
but I want to save it as array("111","444")=""
I am trying to save it from the class like """"_sub1_"""" but its not displaying as expected.
Kindly do the need full.
Thanks in Advance
When we run data purges in a namespace, the size and space of the DB does not change. I assume like Oracle it leaves white space that is usable by cache, but is there a way to see how much of this space is available? Today I increased the size of the disk available to the system as we were reaching critical low disk space, however, with the purges, we should have several hundred GB of available space inside the database to use. And is it safe to allow the system to run out of available disk space, as long as there is enough free space in the DB for writing data?
Hi Team,
We are facing an issue connecting to a remote Cache DB server using CacheODBC 2018 on the client side.
The connection works fine without SSL on the Cache server, but when SSL is enabled, we are getting the below error - "Failed to load cconnect executable!, SQL state 08S01 in SQLConnect"
Also, the connection works fine when the PHP script is run through CLI on client server, but fails with the above error when the script invoked from a client browser.
Could you please help us with any pointers in resolving the issue?
Hello everybody.
My question originated when trying to help a coworker...
There is a system module, specifically a ClassMethod that inserts records into a table as per the pseudocode below:
set Obj = ##class(FooSchema.FooTable).%New()
set Obj.fooProp = fooValue
// Other Foo properties //
set status = Obj.%Save()From time to time, when trying to save the object, an error , informing that it was not possible to obtain the exclusive lock on the table instance
I want, using objectscript, to find out which other part of the system (Classmethod) is causing the lock on this table