It's well-known that namespace global mapping helps us to write code independent on database storage details (Caché instance name, directory path). But sometimes we can face problems accessing an unsubscripted global which has subscript level mapping (SLM) defined. Most of such cases are evident and associated with administrative tasks that should be done on database level, but some of them can confuse even an experienced developer. Just to start:
Is their a way to (setup) automate the removal of users accounts from the system once they have logged out of cache and than recreate them once they log in, so basically the user list only contains live logged in users plus some of the default user accounts.
ERROR #5540: SQLCODE: -76 Message: Cardinality mismatch between the SELECT-list and INTO-list SQLTEXT: SELECT * FROM PMG_Data_Private.RemitInstance WHERE (VoucherNumber %INLIST ? SIZE ((10)))
Hi all,By using LDAP cache method ##Class(%SYS.LDAP).GetValuesLen(LD,CurrentEntry,Attribute) we get the list of attributes but in "ObjectSid" attribute have the SID in binary format(objectSid^U¤:c@ãºþÕLCP]). how to convert to the readable format from the binary format in cache side.
Please help us to proceed further
This code snippet provides a ZEN page that downloads a stream from its database directly:
/// We assume that you have stored your data within this schema:
/// MyApp.Model.Storage: Filename,FileSize,Content,ContentType
Class zen.downloadStream Extends (%ZEN.Component.page,%CSP.StreamServer)
{
/// Wrapper to get the id of the download, we assume that the id is passed to this zen page
/// as a URI parameter, i.e.: MyApp.Downloads.cls?OID=1234
ClassMethod GetId()
{
Quit $Get(%request.Data("OID",1))
}
/// Set the appropriate header for the file.
ClassMethod OnPreHTTP() As %Boolean
{
Set tId = ..GetId()
If ##Class(MyApp.Model.Storage).%ExistsId(tId) {
Set tStream = ##Class(MyApp.Model.Storage).%OpenId(tId)
// You could "guess" the content type by its file extension
// or you can store it (before) in the database separately (like in this example).
// Set Extension = $Piece(tStream.Filename,".",$Length(tStream.Filename,"."))
// Set ContentType = ..FileClassify(Extension)
Set %response.ContentType = tStream.ContentType
Do %response.SetHeader("content-disposition","attachment; filename="_tStream.Filename)
Do %response.SetHeader("Content-Length",tStream.FileSize)
}
Else {
Set %response.Status="404 File Not Found"
Quit 0
}
Quit $$$OK
}
ClassMethod OnPage() As %Status
{
Set Download = ##Class(MyApp.Model.Storage).%OpenId(..GetId())
Do Download.Content.OutputToDevice()
Quit $$$OK
}
}
I've created a datatype class whoch extends from %Library.String with a REGEX parameter and the validation of the value against the regular expression. The class does not support Populate using the regular expression as a template for data population.
Hello World; i have a problem to call function from cache , cache-call:functioninmaccache^MyFileMac(" + id+ ") This rule works but always gives the same link thanks for yours response
Can anyone tell me where to find good resources to learn Caché besides InterSystems. I am looking foe material (ie books, white paper, exercises, ect). There does not seem to be a lot of information on Caché.
Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoint never triggers.
Is there a compiler flag or qualifier to force the compilation to be done in-process rather than getting handed off to a worker job?
You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value 0 (false) or an empty string?
It has been pointed out to me that one of my applications fails to display all of the contents when displayed on an iPhone or a tablet of smaller res that a desktop screen.
Desktop..
iPhone..
The code does not change between the two views of the same page.
Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In this third part of this article series I will show how to link our React app to our three back-ends we created in part 2.
I have an http adapter that calls out to a web service and is looking for a "Completed" response. I want the adapter to wait a certain number of seconds before calling out again to get a response. I have tried setting the retry interval on the business operation but that does not do it. See my code below.
There are some classes in our code base that contain Methods only (no properties). I told my colleagues that converting them into the ClassMethods should improve performance as it would eliminate unnecessary OREF support at run-time. Some of them replied that it would be microseconds, so what is the reason to bother.
Is it possible to estimate the impact of OREF support of method calls at run-time? E.g., as a % of all CPU load.
As part of my dysfunctional journey with FHIR, I'm looking at using the SDA3 within Healthshare to then convert to the HSFHIR format.
This is working surprisingly well, except I'm falling over when it comes to repeating fields within the SDA3 when creating the HS.SDA3.Patient object manually from within Cache.
If I take the Patient ID as an example - within a DTL, I can quite easily take an MRN and add that to the target PatientNumbers.(1).Number and then add an NHS number to the target PatientNumbers.(2).Number.
InterSystems is pleased to announce that InterSystems Caché and Ensemble 2018 are now released!
New in these releases are features that improve security and operations, including:
· Key Management Interoperability Protocol (KMIP) support · Microsoft Volume Shadow Copy (VSS) integration · Integrated Windows Authentication support for HTTP · SSH enhancements