Hi, I think this article wiil be helpful to clean up before reinstall : https://community.intersystems.com/post/points-note-when-uninstalling-intersystems-products-windows
- Log in to post comments
Hi, I think this article wiil be helpful to clean up before reinstall : https://community.intersystems.com/post/points-note-when-uninstalling-intersystems-products-windows
Is it possible to use value for search condition like this :
SELECT p.%ID, p.name, p.street, p.city, p.state, p.postal_code,
pn.phone_type, pn.country_code, pn.phone_nbr
FROM demo_intersystems.Person p,
JSON_TABLE(p.phone_nbrs, '$'
COLUMNS(
phone_type VARCHAR(10) path '$.type',
country_code VARCHAR(8) path '$."country_code"',
phone_nbr VARCHAR(12) path '$.number'
)
)
WHERE country_code = 1If yes, I think this might not be very efficient, as it has to interpret JSON expressions for each row in the table, without using indexes.
Thanks @Danny Wijnschenk & @Robert Barbiaux !
^SPOOL is a great global !!!
To use hypps you have to install CSP Gateaway in an external apache (or nginx) web server.
This external web server can be configured for https (with let's encrypt certifcate if you need fee certificates)
The documentation for csp gateway.
Modifying internal server configuration is a bad idea because in new versions of Iris, it will not be included in the distribution.
Thanks for tour answer @Prasanth Annamreddy but the problem wasn't in the Package Name
(in ##class() the param is full className : package.class), so in my Case Bna.Utils is the package and Sql is the classs
Thanks to @Ashok Kumar T & @Timo Lindenschmid
This is working fine, and I do that but this not an answer to my questions :
I think this must be possible by mapping %SYS bases, but I find this not very secure, I will search more in the doc...
A great tool for me, I will try it very soon
Are your databases part of a Namespace?
If this is not the case, this is necessary to access it through the Explore>SQL tab.
You can create Namespaces in System>System Administration>Configuration>System Configuration>Namespaces.
They can use existing bases
To access to a session in a remote iris instance by ssh, you must
Etablish a functionnal ssh link between your client and your server (For the rest I will call them CLI and SER)
To test this first phase from your client
ssh user@SERafter connection by ssh check your Iris Instance is running
iris allIf yours instance is up like :
Instance Name Version ID Port Directory
---------------- ---------------- ----- --------------------------------
up >IRISHEALTH 2023.1.0.229.0 1972 /usr/iris/2023.1
You can now launch a session and access a terminal :

You are in the right place to have the information you want:
On this web application (https://community.intersystems.com/) you have access to
Resources intersystems on l-the left bar in community t tab where you can find a kit to start using Iris (in a container or not), I suggest you docker container for a faster setup

The learning tab will provide access to course videos
The Documentation tab to the product documentation with a search function (The documentation also includes very useful how-to sections)
The open-exchange tab offers example applications or utility classes that can inspire or save time during your projects.
And of course the community tab. The people here are all kind and will try to help you. You will also find articles full of useful information there.
So you can ask your questions as you learn.
Last but not least: Welcome to the Intersystems community !!
I think you'll get a lot more help if you give the details of your error.
How do you get this error?
In what context ?
On which version of Iris or hidden ( w $ZV to obtain version information)
Furthermore, you are on the site of a volunteer community, saying hello also helps to get help.
If your goal is to delete this file one time you can do it with one of theses methods :
You can delete the file by using terminal : (the sudo command set you with all privileges on files)
sudo rm /tmp/test/test1.txtOr from an Irii terminal
!sudo rm /tmp/test/test1.txtIf not can you tell me how you create it, and give the result of this command ?
ls /tmp/test.txt -lhor (in Iris terminal
!ls /tmp/test.txt -lhI think I've found another way to protect a route.
I'm not protecting the route itself, but the method it points by using [ Requires = "myResource:Use" ] on the called method:
/// Sample APIClass Test.Api Extends%CSP.REST
{
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/test" Method="GET" Call="Test" />
</Routes>
}
ClassMethod Test() As%Status [ Requires = "myResource:Use" ]
{
Do##class(%REST.Impl).%WriteResponse("api method test : OK")
Return$$$OK
}
}I suggest you create a json object in an objectscript method and call this method with an http request from your javascript to retrieve the object
Hi Ron,
thanks for your answer, @Eduard Lebedyuk give me another way to do that which can be more secured.
You can see that in his answer to this post
Hi @Eduard Lebedyuk,
thanks for your answer, I will test it now :-)
Hi @David Hockenbroch ,
Thanks for your answer
Hi,
I answered you in your post in French ;-)
I am currently developing a REST API backend and I have chosen to systematically use classes, because mixing csp files and classes seems to me to harm the maintainability of the code.
Furthermore in this case, a database backup contains everything, I don't have to worry about separate files.
This is just my opinion :)
You can :
Create an abstract class with a method that successively calls:
FileCompact() and ReturnUnusedSpace() from the class SYS.Database
Then you can add in the task manager a new task (type RunLegacyTask) which calls your method
Before doing this, I advise you to make a backup of your database or a snapshot of your machine if it is a VM
Thanks for this article,
Just what I need to start using python (I use Objectscript since 12 years), and examples is more efficient for me.
I asked intersystems for the same question, the solution is to upgrade to 2023.3 (2023.1 has issue in error reporting in Atelier)
To complete @Ashok Kumar T answer, the good way to get file content :
Set source = %request.GetMimeData("file")
Set destination=##class(%Stream.FileBinary).%New()
Set destination.Filename="/opt/irisbuild/output/"_source.FileName
set tSC=destination.CopyFrom(source) //reader open the fileset result=destination.%Save()
Hi Zhang,
In the portal : System/Security/Roles you can create your own role like "myUserRole".
When created you have in the role definition a tab "Sql Tables".
In this tab you can add the tables which the role can access.
If you assign the created role to a user, he can access the tables.
hardcopy of the Sql Tables Tab in System/Security/Roles (in french)

You can access your elements by this way (for the example, your object is named jsObj)
w jsObj.%Get(0).thingone,!
Red
w jsObj.%Get(0).thingtwo,!
Green
w jsObj.%Get(1).thingone,!
Blue
w jsObj.%Get(1).thingtwo,!
Yellow
Caution : For dynamic array, first element is indexed by 0, not 1 like ObjectScript standard arrays
Thanks Julius,
It was exactly what i needed. My goal was to copy properties from a dynamic object to a persistent object, but in dynamic object for reference, I have only id, not a ref.
So i made this : (main class)
Class Bna.Utils.DynToPersistent Extends%RegisteredObject
{
Property DynObject As%Library.DynamicObject;Property PersistentObject;
Method %OnNew(dynObject As%Library.DynamicObject, persistentObject) As%Status
{
Set..DynObject = dynObject
Set..PersistentObject = persistentObject
Return$$$OK
}
Method copyDynToPersistent()
{
set pClass = ..PersistentObject.%ClassName(1)
Set iterator = ..DynObject.%GetIterator()
while iterator.%GetNext(.pProp, .pValue) {
Set pType = ##class(Bna.Utils.Common).GetPersistentObjectPropertyType(pClass,pProp)
Set isRef = ##class(Bna.Utils.Common).PersistentObjectPropertyTypeIsReference(pType)
if isRef {
set value = $ZOBJCLASSMETHOD(pType, "%OpenId", pValue)
} else {
set value = pValue
}
Set$ZOBJPROPERTY(..PersistentObject, pProp) = value
}
}
}(utility methods) :
ClassMethod GetPersistentObjectPropertyType(pClass As%String, pKey As%String) As%String
{
set def=##class(%Dictionary.PropertyDefinition).%OpenId(pClass_"||"_pKey)
if def Return def.Type
}
ClassMethod PersistentObjectPropertyTypeIsReference(pType) As%Boolean
{
if$EXTRACT(pType,1,1) = "%" { Return0 }
else { Return1 }
}
I think my test for reference detection can be light, but enough in my context
Thanks George,
It's not what i search, I would have the type, not test if is one type.
Hi Eduard,
Thanks for this utility method. I think I will use it for debugging
Hi Chad,
Thanks for your alternative syntax !
Many thanks, works fine and it's exactly what I need