Question Nezla · Oct 13, 2022

Hi Guys,

I'm exporting a Zen report to excel using the following : SET Status=rpt1.GenerateReport("c:\temp\Intruments.xls",10)

and it's working ok but I'm getting extra fields that they shouldn't be there.

here is the correct html format :

4
0 548
Question Nezla · Oct 11, 2022

Hi Guys,

 

I've the following node js code (see https://github.com/CassiaNetworks/CassiaSDKGuide/blob/master/node_examp…) that I would like to use in one of my csp pages by including it in my  <script type="text/javascript"> tag but some syntax is not recognized and I'm guessing that node js has some extra libraries doesn't exist in regular Javascript (some examples below), so is the a way to include node js in my page?

 

thanks

3
0 345
Question Nezla · Oct 10, 2022

Hi Guys,

I'm getting a lot of hs_err_pid.mdmp & hs_err_pis.txt error files in the path where Cache.DAT in located and as I googled these seems to be Java error files and I'm wondering what this has to do with Ensemble, and is it alright to just delete them?

 

Thanks

0
0 224
Question Nezla · Oct 9, 2022

Hi Guys,

This link (https://github.com/CassiaNetworks/CassiaSDKGuide/blob/master/node_examp…)   uses Javascript request to open a a steam and collect data in an array  (screenshot below) and I'm trying to replicate this with Cache script with HTTP request which is connecting Ok but don't know how can I collect data because the code is hanging at Set tSc=Httprequest.Get(HttpURL) and cannot execute BLEConnect=Httprequest.HttpResponse.StatusLine or any line after it.

9
0 592
Question Nezla · Oct 7, 2022

Hi Guys,

I'm a new developer taking over an existing project that I'm not that familiar with and while running a few pages I came across some used urls that leads to same page!?

This two urls for example takes you tom the same page which is actually oneFldLogin.cls class although the url will show up as (http://34.196.215.250:81/us-spacesense/mobmtce/MSDS.UI.HandHeld.MobMtce.PMOrder.cls) and I'm guessing there url masking & redirection involved when accessing PMOrder to oneFldLogin but could see any call to oneFldLogin.

2
1 412
Question Nezla · Sep 15, 2022

Hi Guys,

I'm using the below code that should get me a JSON response, here an example of what I get if I run it from the browser:


Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="nn.sxhub.com"
Set Httprequest.Timeout=30
 Set Httprequest.Port=9222
Set Httprequest.Https=1
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Accept-Language","en_US")
Set HttpURL="/SX/api/visiblebles?mac=CC:1A:E2:E1:A4:30"
Set tSc=Httprequest.Get(HttpURL)
If $$$ISERR(tSc){
!, $System.OBJ.

3
0 462
Question Nezla · Sep 14, 2022

Hi Guys,

I do have a class where one it's fields is defined as  %TimeStamp and I did query to select all records and if current datetime is bigger then what's in my nextScheduled filed and basically with this condition below I should have all records stored in ^badis but for some reason I'm only getting the first record   

 sql="Select ID,CollectTimeOut,KitId,ComponentId,Loc,IntervalValue,IntervalType,LastScheduled,NextScheduled,Schedule,StartDate,StartTime,SensorId,SensorType from MSDS_Common.JobSchedule"
 Set RSet=##class(%ResultSet).%New()
 Set Ret=RSet.Prepare(sql)
 Set Ret=RSet.

5
0 725
Question Nezla · Aug 31, 2022

Hi Guys,

My understanding is that Count in SQL query returns a integer but I'm using this query in a loop where is the count is bigger than 2 skip and go to next record but it looks like it's not doing it, because I'm expecting that ^badis("retries",2,ID) will always be 2 or less but ^badis("retries",2,ID) did have 4 or 5 and I'm thinking that TryCount is actually not a number that's why Continue:TryCount>2 didn't work?

 

 &SQL(SELECT count(*) INTO :TryCount FROM MSDS_Common.

1
0 238
Question Nezla · Aug 20, 2022

Hi Guys,

I'm a newbie in Ensemble productions and I've been asked to create an Inbound adapter and specify a port of which clients can send through JSON files and I did as attached, but now I've been asked to provide the URL to give to our clients so they send their JSON files to and I don't know what URL is should look like!? 

 

 

 

Thanks 

3
0 293
Question Nezla · Aug 17, 2022

Hi Guys,

I've newly joined a new company and have been asked to get the number of classes in their system and was wondering if Ens, EnsLib and EnsPortal are normally a system or default packages that comes with default classes that developers can use or override? 

6
0 295
Question Nezla · Aug 17, 2022

Hi Guys,

is there an easy way to count all line of codes in all classes in a namespace ?

I've been asked to give the total lines of code in all our system and we have over 3000 classes, so opening each one of them to check total line would take a long time.

 

Thanks

10
0 499
Question Nezla · Aug 16, 2022

Hi Guys,

My application is running in Chrome but not in IE and I'm guessing it's a security issue, where when I open IE it tells me that ESC in on, but checking the configue in Server Manager tells otherwise? 

 

 

 

Thanks

1
0 236
Question Nezla · Jul 21, 2022

Hi Guys,

usually when I want to find out which class is a zen page is, I just right click on the page and go to properties and this will show me the class url, but with this client I don't get properties as below !?

 

Thanks

3
0 348
Question Nezla · Jul 20, 2022

Hi Guys,

Is there online tutorials or samples on how to use Inbound Adapters ?

All I'm looking for at this stage is to create and inbound Adapter in a production to request to connect to a client where I can Get JSON file and what do I need to establish the connection?

 

Thanks

1
0 281
Question Nezla · Jul 20, 2022

Hi Guys 

how do I deal with single Quote inside string in an SQL query?

currently this type of query is failing with an error asking me for a closing quote :

Select * from cnd.Facilities  where name like ''%Grill's BBQ%'

Thanks

5
0 1882
Question Nezla · Jul 19, 2022

Hi Guys,

We use the below code to send JSON file to one of our clients and was working fine but I think lately they did a windows update and now whenever we send file we aren't getting any HTTP responses, success or Error, just empty response ()

the think is that it works fine and we get 200 response if we send the JSON file using our client's portal called swagger which is a website where you can assign the token and url (Swagger UI (vibra-api-prod.azurewebsites.net))

nothing has change from our end so why we aren't getting any HTTP response as all (see below)?

6
0 669
Question Nezla · Jul 14, 2022

Hi Guys,

 

How can I create a clone class so I can keep a copy of all records in that clone class?

Basically, I have a class where sometime records might be delete from it, so I would like to create clone class or merge the global content in another backup global so that records can be deleted from the original class but still have a copy of those delete records in my clone or backup global ?

 

Thanks  

5
0 529
Question Nezla · Jul 14, 2022

Hi Guys,

is there a way to get an audit or a record of deleted records in a class?

so basically, I'm looking for way to track delete record or from which class or class method call that delete statement was executed,  my understanding is that so for example using %OnfterDelete  I can track any deleted record using %Delete(), so if the user execute a (Delete from myclass)   sql statement can OnfterDelete track that ?

6
0 575
Question Nezla · Jul 6, 2022

Hi Guys,

I've a zen report that populate as excel to the screen using DEFAULTMODE = "xlsx" is there a way that I can run send that zen report to a file in a specific path all in the background rather to the screen?  

Thanks

1
0 365
Question Nezla · Jul 5, 2022

Hi Guys,

I'm using the below to export a query result to excel file and the only file type is .csv (100) but the resulting has two problems,

first the row header is including the field type and second the resulting file is a tab delimited so columns aren't properly separated (see attached below) 

set st = ##class(%SQL.Statement).%New(2,"Sample")
set sql = "select ID, name from MyClass"
do st.%Prepare(.sql)
set type="csv"
  set rs = st.%Execute()
  do rs.%DisplayFormatted(type,"C:\Temp\report")
 

 

 

Thanks

5
0 607
Question Nezla · Jun 7, 2022

Hi Guys,

We currently running all our clients in Ensemble 2014, but now we are having a problem that 2014 can't resolve (TLS version is 1 where we need TLS 1.2 or higher).

basically, all we're looking for is a classmethod in Ensemble 2018 that uses HTTP request to connect to a client server and get tokens & some JSON files and then save them in a class available in our current 2014 production server.

1
0 242
Question Nezla · Jun 4, 2022

Hi Guys,

I'm getting the below TLS error in SSL_connect(), SSL_ERROR_SYSCALL, I've treid mulitple SSL/TLS configuration and still get the same error, so should I be asking the client that I'm trying to connect if there a specific certificate or configuration!?

 

Thanks

4
0 854
Question Nezla · Jun 1, 2022

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

1
0 234
Question Nezla · May 30, 2022

Hi Guys,

I'm using the below code to post a JSON file:

 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.

3
0 615