How can I convert date format ddmmmyyyy to yyyymmdd in cache?
example: 14JAN1991 to 19910114
InterSystems Caché is a multi-model DBMS and application server. See more details here.
How can I convert date format ddmmmyyyy to yyyymmdd in cache?
example: 14JAN1991 to 19910114
Hi all,
I have a class that I want to serialize to JSon. So I'm using the object %ZEN.Auxiliary.jsonProvider)
set myClass = ##class(myapp.myclass).%New() set myClass.property1 ="value 1" set myClass.property2 = "value 2" set myClass.property3 = "value 3" do ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.tStream,myClass ,,,1,"ed") write tStream.Read()
By definition of myclass, all properties are serialized, that's fine. But I want not serialize the property3. I think is using a XML attribute in the property, or something about. But I didn't find anything about.
Hi Everyone!
You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":
Hello Community,
Hope someone can assist me to POST a JSON to the below URL. It works perfectly with POSTMAN. But when trying with cache/Ensemble i receive Method not found error
Below is the configuration.
set ..Adapter.ContentType="application/json"
Set tURL=..Adapter.URL
Set pRequest={"name":"abc1jim23","salary":"123","age":"23"}
set tSC=..Adapter.PostURL(tURL,.tHTTPResponse,,pRequest)
Response is complaining about the Method not found Http error.
Assistance will be appreciated.
Thanks,
Jimmy Christian.
Can I connect to Cache using SSMS (SQL Server Management Studio) and view schemas and build queries as I do for SQL Server?
If yes, step-by-step instructions for setting up the connection would be greatly appreciated.
I googled the topic but didn't find any results that were on target.
Thanks,
Christian Bahnsen
I am fairly new to Cache and ObjectScript. I have a new task I have created with a corresponding method that I am trying to debug in Studio (2013).
My ClassMethod looks like this
ClassMethod DoMyWork(Output pWorkCount as %Integer, pInput1 As %Integer = 30)
{
/* Does some work here and increments pWorkCount */
}When I try to debug this using studio, I browse to my method but I am not certain what to put in here for the input parameter 'pWorkCount'.
I tried to execute the class in the terminal window but I am not sure how to enter debug mode using the terminal window.
Thanks.
CSP pages extend %CSP.Page. What about html/css/js/etc that are hosted on the same web application? Is there any way to override how they're processed like with how you can override a CSP page and CSP REST logic?
Thank you!
David
Hi,
I am looking for an Objectscript example to calculate PI (3,14) with at least 100 Decimals.
There are many examples on the internet (https://rosettacode.org/wiki/Pi), but I want to use it for testing purposes.
Regards,
Peter van Voorthuysen
The Widgets Direct sample application highlights many aspects of how to use InterSystems technologies to build a modern web application. Features include:
All,
I'm using Cache 2014.1 in an openVMS environment.
If I have multiple RMS files to clean up, for example.
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;2 MEMBER_EXTRACT.CSV;1
MEMBER_EXTRACT.PROC;1 MEMBER_EXTRACT.TXT;3
MEMBER_EXTRACT.TXT;2 MEMBER_EXTRACT.TXT;1
S FILE="MEMBER_EXTRACT.*;*"
Do ##class(%Library.File).ComplexDelete(FILE)
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;1 MEMBER_EXTRACT.TXT;2
MEMBER_EXTRACT.TXT;1
Total of 3 files.
I am looking to get the exec statement when we call the SP with ..Adapter.ExecuteProcedure.
Set tSQLQuery="exec pSPName ? ? ?"
Set Status = ..Adapter.ExecuteProcedure(.tResultList,.tOutParms,tSQLQuery,"iii*, 1,2,3)
Get the exec string: exec pSPName '1', '2', '3'
Hi Community,
I'm looking for a new contract with immediate availability.
I have 20 years experience with InterSystems technologies in areas such as Healthcare integration and single page web development.
I can work almost anywhere in the UK as well as remote work from my office in Exeter.
If you know of any opportunities or could pass on my LinkedIn details to anyone that might be looking then it would be very much appreciated.
https://www.linkedin.com/in/sean-connelly-94a6901/
Kind Regards,
Sean.
What would a sample DbContext look like and how would you register the DbContext in the Startup.cs ConfigureServices method?
Hey Intersystems-Developer,
I have already used that and know its possible, but can't find it anymore :(
I need dynamic access on proxy objects. For example:
set key = "lastName"
set name = obj.name
set lastName = obj.key <- Not possible
set lastName = obj.GetAt(key) <- Not possible
How can I get access to that object with my dynamic variable "key" ?
Best regards.
I have a process that receives a EnsLib.DICOM.Document, and then attempts to extract a PDF from the dataset to save to a folder.
When I use the GetValueAt method to get the pdf from the document (from the EncapsulatedDocument section), the status returned is 1, but I'm only getting the first 32648 characters(?) from the PDF.
I thought it was a string max length problem, but long strings are enabled and the final PDF is tiny (94kb) so it's not hitting the long string.
Is there some form of limit to using the GetValueAt method that I'm missing?
When we go to specific name space to search messages in message viewer, at the moment we are adding the search criteria to add criterion type as SearchTable Field, and clicking the dropdown in Class field, there is an error says below in the image:
Could anyone please let me know what exactly the error is from? Thanks so much.
Hi, i have a problem, i need to put some Caché Code into a .JS file. Is this possible?
Getting an error while installing on macOS. Somebody, please help.
Hi guys!
As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).
1. Get it by as a property of an instance with "Object access":
ClassMethod GetPropertyForID(stId As %Integer) As %String
{
set obj=..%OpenId(stId)
return obj.StringData
}2. Get it as a value of a column of the record with "SQL access":
For each defined property, query or an index, several corresponding methods would be automatically generated on a class compilation. These methods can be very useful. In this article, I would describe some of them.
Hi All,
I'm just taking a look at IRIS and what it has to offer, and if this is something the organisation I work for should be looking to take advantage of.
I think I've come across an early sticking point, and I wondered if anyone knew of any options.
Hi, Developers
When I click save button into cache server pages then following error pops up.
JavaScript exception was caught during execution of Hyper Event: Syntax Error: Expected.
We would like to use our Caché-server as the source for our PABX-addressbook.
The PABX only supports LDAP.
Is it possible to use our Caché-instance as an LDAP-server ?
Regards, Kurt Hofman.
Hello, community!
I've stumbled on some unexpected behavior, and decided to check with you if this is normal. Basically, I'm rebuilding indices and the result is not journaling (which leads to missing indices at shadow server).
The $ZV is "Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:53:38 EDT"
I have an example class
Class tmp.A As %Persistent; Index IP1 On P1; Property P1 As %String;
for example there is one object which have P1 = 1, so
^tmp.AI("IP1",1,1) = ""If I rebuild it wth
zw ##class(tmp.A).%BuildIndices(,1)
the weird thing is the
Hello,
I try to open an existing log file and append to it. In Windows I use Open file:(NRW):1. I would expect it to append to the file, but each time I execute the code I get only the new entries, the prior file content is lost.
What is the proper syntax top open a file in "Append" mode?
I will deploy this code in Linux. Is there a different syntax to open a file in Linux versus Windows?
Thanks,
Oliver Wilms
Hello everyone,
Anyone can help me please. We use SOAP web service with public methods and have many instances of these classes, all work fine. We would like to create a new SOAP web service but for internal usage only, meaning not available to the public. The purpose of this is for communication between different servers internally.
We thought of having the methods to be Internal, WebMethod instead of just WebMethod.
Any suggestions?
Regards
Ben
How can I remove elements from $lb property? Specifically last element?
$list does not work with $lb properties.
$listupdate can't remove elements
The only solution I found is a temp variable and $list, but isn't there something better?
Hi
Quick question... Is it possible to save a class in another namespace. If you're saving a global you can just use an extended reference, but is it possible to achieve the same when saving a class object? Obviously the class will be defined in the other namespaces too.
I want to do it from an Ensemble SOAP Service. I guess you could switch namespaces, but I was a bit worried about doing that from Ensemble process.
thanks