Question Pierre LaFay · Feb 17 Get ZW display in a variable Hello everyone, I'm looking for a way to retrieve the result of the ZW command in a global, is this possible? #InterSystems IRIS 2 11 0 360
Question Pierre LaFay · Feb 4 Calling a class from another Namespace Hello everyone, I am looking for the syntax or the way to use a class created in the "BNA" Namespace (my application) from the %SYS Namespace. Here is the context: I have a "BNA" application contained in the "BNA" NS, this application provides a user creation functionality. This feature creates both the user in a table in the application and in the Iris system. #Key Question #Namespace #ObjectScript #Security #SQL #InterSystems IRIS 0 9 0 392
Question Pierre LaFay · Dec 29, 2023 How to temporarily give role(s) to a user? Hi, Our application needs to create system users from a request form. To use Security classes, it is necessary to have rights to use the %SYS namespace, which is not the case for users who validate requests. It is not desirable for these users to have this role permanently, so I proceeded as follows: I created a facade class for the Security.Users, Security.Roles, Security.Resources classes which allows me to log in with an authorized user on the NS %SYS Here is an example method: #Key Question #Namespace #Security #InterSystems IRIS 1 7 0 259
Article Pierre LaFay · Dec 18, 2023 1m read How to implement sequence without using a ID If Iris does propose to create keys following a sequence, how can we obtain a sequential number in another context? In my case, I automatically create care centers, and I want to set them a number like: APP-DD-999 APP = Name of the application used by the centerDD = center department number999: sequential number in the departmentIt is of course possible that centers will be created in competition, so this possible competition must be managed. #Code Snippet #InterSystems IRIS 5 3 0 227
Question Pierre LaFay · Nov 13, 2023 How to get type of a property I want to get a persistent object property type in objectscript and I don't find how to do this. Can someone help me ? #InterSystems IRIS 1 5 0 468
Question Pierre LaFay · Aug 20, 2023 How to get param passed in GET REST query Hi, I don't found how to get params send by a GET REST query (not in url but by request param). this is config of the call in postman I try to get %request.Data, doesn't work : Data is undefined I try to get %request.GetCgiEnv("Data"), doesn't work, return "" I do ZW %request and see that my parameter is present in cgi parameters, but I don't now how to access it. #REST API #InterSystems IRIS #InterSystems IRIS for Health 0 9 2 840
Question Pierre LaFay · Aug 11, 2023 Add processing during login in a class extending %CSP.REST Hi,For a REST application, when a user connects, I have to write a message in an application log.The login is processed by the /login routine by default. How can I add a process to the login process?Is there a callback ?Should I create a login method in my class that extends %CSP.REST ?I'm not sure and can't find information in the documentation ? I try this (not working) : <Routes> <Route Url="/lists" Method="GET" Call="GetLists" /> <Route Url="/me" Method="GET" Call="GetUserInformations" /> #InterSystems IRIS #InterSystems IRIS for Health 0 11 0 178
Question Pierre LaFay · Aug 3, 2023 How to initialize a new Object Hi, I try to initialize some properties of a %DynamicObject during his creation. I Try to use InitialExpression this way : Property refDate As %Date [InitialExpression = $piece($horolog,",",1)]; But it doesn't compile I don't found if %DynamicObject can have a constructor to initialize properties by a calculated value, like other languages. #InterSystems IRIS 0 4 0 188