Hi Guys,
I had a task that was running ok but then crashed and now getting this error <COMMAND>zRunTask+72^%SYS.TaskSuper.1?
Thanks
Hi Guys,
I had a task that was running ok but then crashed and now getting this error <COMMAND>zRunTask+72^%SYS.TaskSuper.1?
Thanks
Hi Guys,
I have a service that picks up jobs and process them, is there a way that I can cap the number of attempts to pickup a certain job eg. 10 times if no response then just discard ?
Thanks
Hi Guys,
I'm using the below code to post a JSON file:
S FilePath="D:\Allied_InterfaceData\ResponseFiles\CollectionData\CollectionGood\CollectionGood_9503948.json"
Set File = ##class(%File).%New(FilePath)
Do File.Open("R")
Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="vibra-api-dev.azurewebsites.net"
Set Httprequest.Timeout=30
Set Httprequest.Https=1
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","*/*")
Do Httprequest.SetHeader("Authorization","Bearer "_^Token)
While ('File.
Hi Guys,
how can I write a json file in httprequest, I'm using the below but when I check what's in mystring it's actually truncated and doen't include all my file?
Set stream=##class(%FileBinaryStream).%New()
S FilePath="D:\Allied_InterfaceData\ResponseFiles\CollectionData\CollectionGood\CollectionGood_9431312.json"
Set File = ##class(%File).%New(FilePath)
Do File.Open("R")
Set Line = File.Read(1000)
While (File.Read(1000)'="") { S mystring=mystring_File.Read(1000)
}
Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.
Hi Guys,
I've a JSON file and I'm using the below code to post it but I'm geting "HTTP/1.1 415 Unsupported Media Type" error, could help pls?
Set RootMIMEPart=##class(%Net.MIMEPart).%New()
Set BinaryMIMEPart=##class(%Net.MIMEPart).%New()
Set contentdisp="form-data; name="_$CHAR(34)_"file"_$CHAR(34)_"; filename="_$CHAR(34)_""_$CHAR(34)
Do BinaryMIMEPart.SetHeader("Content-Disposition",contentdisp)
Set stream=##class(%FileBinaryStream).%New()
Set stream.Filename=FilePath
Do stream.LinkToFile(FilePath) Set BinaryMIMEPart.Body=stream
Do BinaryMIMEPart.
Hi Guys,
I had a record with name field has a uniqueKeyIndex, so because I couldn't change and update the name description using SQL, I went and changed the name description in the Globals and removed the Index on name with old description, but now I wanted to create a new record with the old description that I removed from Globals but I'm getting UniqueIndex error, which means the old description is still somewhere in one of the globals, but I can't find that record anywhere in both data or index globals ?
thanks
Hi Guys,
I'm using the below so I can put JSON file in an object and read each property:
d ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(JSONString3,,.list)
S Job= list.jobGUID
but because the JSON starts and ends with [ ] my list is empty, and I had to remove them to get a good list.
So is there a way that I can handle this which having me removing those brackets each time, because I thought %ConvertJSONToObject to be able to handle this anyway?
Hi Guys,
I'm running Ensemble 2014 and I'm using this to convert JSON to object:
class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject
but how can I convert to %CharacterStream because I'm saving a %CharacterStream field
Thanks
Hi Guys.
I'm a newbie in productions and services and I'm using this code to get HTTP response with JSON file, is a way to do this via a production service?
set Httprequest = ##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="serverurl"
Set Httprequest.Https=1
Set Httprequest.Timeout=30
S Token="sometoken_value"
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Authorization","Bearer "_Token)
set tSc = Httprequest.
Hi Guys,
I'm using the below code to get a JSON file using a Token, I can get json file with not problem from the the command prompt as below,
curl -X 'POST' \
'https://vibra-api-dev.azurewebsites.net/api/jobs' \
-H 'accept: */*' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
Hi Guys,
How do I create a JSON with the below structure pls:
{
"field 1": "123",
"field 2": "1.1.1",
"field 3": "4.428",
"Lines": [
[ 0.00523, 0.00952, 0.01626 ],
[ -0.00303, -0.00286, 0.00387 ],
[ 0.00110, 0.00814, 0.00800 ],
[ -0.00991, 0.00952, 0.00800 ]
]
}
thanks
Hi Guys,
I currently have a service that uses an InboundAdapter to get a JSON file and process it given that the client is pushing data to us, but now we have another client where we need to request the JSON file by sending a HTTP request then get the file and process it, kind of a Get rather than push, how can I create a service that handle that?
Thanks
Hi Guys,
is there a sample code where I can basically send a HTTP request given a URL and authentication and handle the JSON response?
Thanks
Hi Guys,
How do I add another tablepane or gridview to make my tablepane look like expandable and collapses back as in the below pic?
so basically I would like to add a child tablepane or gridview for each row that populate the related details for it.
.png)
thanks
Hi Guys,
Can you pls let me how to convert %CharacterStream to JSON and also how to Convert JSON to %Stream.GlobalCharacter?
Thanks
Hi Guys,
I've a Production Service that receives a CharacterStream and save it in a Global, then a second classmethod that pick up that CharacterStream from the global and process it, but for some reason it fails when i comes Set HTTPURL = $ZCVT($G(pInput.Attributes("URL")),"U") which error saying "INVALID OREF", as I checked it seems that pInput is has a CharacterStream but not sure why is says invalid Object ref (see attached)?
Method OnProcessInput(pInput As %CharacterStream, Output pOutput As %CharacterStream) As %Status
{
Set pOutput=##class(%GlobalCharacterStream).
Hi Guys,
we have a class with over 24 million records and despite indexes querying is still slow, so we are looking to create a copy or clone of our current class have an scheduled task that runs every night or month, copy old records this new clone (eg. from last month) and remove old them from our current class.
Hi guys,
How do I create a make a http request using curl, I've found samples on how to do it from a command prompt but how to create and make a http post request and get a response with ensemble object and functions?
I guess somthing like :
s req=##class(%Net.httpRequest).%New()
...etc
Or do I build a command run it in ensemble and get a response back, if so how can I do that ?
Thanks
Hi Guys,
How do I do a HTTP post request using a curl and get a response, the response should be a JSON file ? a sample code would be really appreciated.
Thanks
Hi Guys,
How do I convert a Query resultset to JSON file ?
Thanks
Hi guys,
We have created a utility to allow users to create a System task for a list of items the same way it’s done via SMP (attached below), the problem is that there may items and those systems tasks will grow a maybe exceed a couple of thousands so :
Hi guys,
I have a %Time filed with (Format=1) to allow showing hh.mm.ss and the field is showing fine in display mode eg:
it should show 00:07:30 but the seconds are cut off from it as below :
any ideas pls?
thanks
Hi Guys,
I know that there a way to view global content from the Terminal rather the SMP but I can't remember the command, I think it's something like D ^Global or something !?
Thanks
Hi Guys,
I'm using the below code to export to excel and it's working fine for one client but not for another and both clients are running the same version of IE 11.
for the second client the code generates an empty xlsx file and when I try to open it it says file corupted although data exits in the resultset, so is there a flag or setting needs be done in the client server or IE?
Class MSDS.UI.Serenity.Report.ExcelExport Extends %ZEN.Report.
Hi Guys,
I'm using seconds counter then save those seconds in a field defined as string where eg. I do :
S time=30
S time = $zt(time,1)
Update myclass se timeSpent = :time
which now shows up as 00:00:30 if I do an sql query which good but the problem if I run a query to get average timeSpent I get 00:00.
having the field defined as integer would allow selecting avg but running a query in my Zen page wouldn’t show me a time format
so how can I get an average on my a filed defined as string in a sql query?
thanks
Hi Guys,
I'm a bit confused where if I run a query trough SMP I don't get any result which should be true but if I run the same query from a classmethod I get a query result which shouldn’t be even if I pass any gibberish parameter into my class method because I'm sure there should be any data? see attached
Thanks
Hi Guys,
I've the below tablePane and for some reason when it's populated always the last row is selected by default, I've many tablePanes defined the same way but none of them has the last row selected when populate, so not sure why this grid is doing this?
Hi Guys,
Can I insert a new row and enforcing my own ID not the default id increment?
&sql(INSERT INTO Sample.Person
(ID,Name,SSN)
VALUES ('205','Swift,Jonathan','111-22-3333'))
IF (SQLCODE = 0) {
Write "New Person inserted with ID: ", %ROWID,!
}
else
{WRITE !,"SQLCODE=",SQLCODE," ",%msg }
I tried this in samples and got the below error:
SQLCODE=-111 INSERT of Default Only RowID Field 'ID' in table 'Sample.Person' not allowed
thanks
Hi Guys,
is there an easy way to import MS Access database into ensemble?
Thanks
Hi Guys,
I've the below query that selects the existing processes with dates & times and it working fine, but in case of records with the same processedDate I would like to only get the latest based on processedTime field?