Question Nezla · Jun 15, 2023

Hi guys,

How can I get the list of printer in client Zen page?

We currently use an ActivexObject call "MSDesign.WebLabel" to get the list of printer loaded in a dropdown in our Zen pages:

        webControl = new ActiveXObject("MSDesign.WebLabel");
                  if (webControl!=null) printers = webControl.getPrinters();
and this will give us a list of printers available in client machine but this does work in Edge or Chrome, is there a tool or simple code that I can use to get me the list of printers available?

Thanks 

2
0 233
Question Nezla · Jun 6, 2023

Hi Guys, I'm resending this because I sent on the weekend and looks like it has not been noticed much 

I'm not that familiar in using Javascript in Zen pages, so basically we have a priting utility (app) that requires us to add a bit of JavaScript call to facilitate printing from our Zen pages as below:

So I added XData link pasted the required script, is this the correct way?

2
0 366
Question Nezla · Jun 6, 2023

Hi Guys,

I'm using the below code to download, extract files in a file directory then save data into a global, and remove the file directory as not needed anymore, but the issue is that the class(%File).RemoveDirectoryTree is not deleting, also tried class(%File).RemoveDirectory and same thing.

I'm suspecting that maybe because the process is still considering the file or the directory is opened or still in use !? I also tried to run the class(%File).RemoveDirectoryTree("D:\SpaceSense2014\LIVE-SPACESENSE\NodeJS\FFTData_20019082")  from the terminal and still nothing ?

The  two class(%File

5
0 391
Question Nezla · Jun 4, 2023

Hi Guys,

Sorry I'm not that familiar in using Javascript in Zen pages, so basically we have a priting utility (app) that requires us to add a bit of JavaScript call to facilitate printing from our Zen pages as below:

So I added XData link pasted the required script, is this the correct way?

Thanks

0
0 203
Question Nezla · May 25, 2023

Hi Guys,

is there any sample I can use for Images, I'm just looking for a very simple one where I can have an upload control to upload images & image control to show them?

Thanks

12
0 337
Question Nezla · Apr 17, 2023

Hello,

I've the below datacombo definition and when selecting an item from it and make this call:

var component=zen("Component").getProperty("value"); 

I would get the ID (first column) which is what I'm looking for

<dataCombo id="Component" name="Component"  align="left" size="30" maxRows="400" 
     sql="select ID, name From MSDS_Serenity.Kit Where (is null or %UPPER(name)[%UPPER(?)) And Loc=AND Active=1 and ParentKit  is not null and (RapidSterTemp 

0
0 213
Question Nezla · Apr 17, 2023

Hi Guys

How can I refresh a dataCombo after saving a new element in it?

I've the following dataCombo and after saving a new element I would like to fresh and reload that data in it? 

<dataCombo id="Asset" name="Assets" align="left" size="30" maxRows="400" 
 sql="select ID, name From MSDS_Serenity.Kit Where (is null or %UPPER(name)[%UPPER(?)) And Loc=AND Active=1 and ParentKit  is null and (RapidSterTemp 

1
0 218
Question Nezla · Apr 5, 2023

Hi Guys, 

I have two dropdowns where if I select a type from the first dropdown I would like to populate all subtypes in the second dropdown as below (I've set showquery =true to show you what's going on )

but for some reason I'm not getting the query filtering to the required where clause.

eg. by select Bearing from the first dropdown I should only get 6 records in subtype dropdown, but I'm getting all subtypes 

here is my code:


<dataCombo id="Type" name="Type"  align="left" size="25" maxRows="400" 
sql="Select ID,Component from MSDS_Common.

2
0 549
Question Nezla · Mar 26, 2023

Hi Guys,

How can I include an Expando  in a tablepane, I would like that each row have an expando that I can use to include some other things as in the below screenshot

i've used the below so i can include the expando but its not working, so how can I include a zen control like expando onDrawCell or in my tablepane ?

Method DrawLink(pTable As %ZEN.Component.

0
0 249
Question Nezla · Mar 20, 2023

Hi Guys,

I've the below code that copies 15000 records into a global, problem is that taking around 11 secs to finish and I'm wondering if there is any faster way (eg. would copying the file into stream and look through the stream makes it faster!?) because I've hundreds of files I need to process every time. 

Set File=##Class(%File).%New(FileAfUnZip)
Do File.Open("RS")
While 'File.AtEnd{
Set ReadData=File.ReadLine()
^DumpTempSeries(Equipment,Sensor,ID,MeasureDT,$I(i))=+$P(ReadData,",",5)_"^"_+$P(ReadData,",",6)_"^"_+$P(ReadData,",",7)
Quit:i=Total
}

Thanks

4
1 543
Question Nezla · Mar 19, 2023

Hi Guys,

I've a task that runs every 10 mins executing the below code, but the issue is that it slowing the system down affecting other processes, so is there a way to maybe spread the execution of this so it doesn't slow down the system? I've tried spreading these fucntion in two different tasks but doesn't seem to change much.

Method OnTask() As %Status
{  
##class(MSDS.Common.ConditionMonitoring).GetKitList("20779")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21822")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21147")
J ##class(MSDS.Common.ConditionMonitoring).

4
0 417
Question Nezla · Mar 8, 2023

Hi Guys,

I'm using session to save some data eg. login details, data I need earlier, and of course if the screen left idol with no activity the session may time out and I would like to display a message waring the user that their session is about to expire (as some web application do) , so how can do that?

Thanks

2
0 307
Question Nezla · Mar 2, 2023

Hi Guys,

I'm using the below code but I'm getting an uncomplete JSON file, so it seems that the command S obj=Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size) is not reading the whole file, so maybe the file is too big so is there a max size or can I change something in my call ?

The uncomplete file that I received so far is about 3.5MB 

  

set Httprequest = ##class(%Net.HttpRequest).%New()
  Set Httprequest.SSLConfiguration="RTLS"                              
   Set Httprequest.Server="vibra-api-prod.azurewebsites.net"                 
  Set Httprequest.

4
0 302
Question Nezla · Feb 21, 2023

Hi Guys,

How to create a user that can have access to only one specific Zen page of an application?

Thanks

3
0 235
Question Nezla · Jan 27, 2023

Hi Guys,

Sealy question but I'm between a hard and rock :)

I've a running method that deletes a list of records and its has been running for hrs and did place locks so other processes can't progress, and to what I can see it will still run for a few more hours, so how can I stop this process at this point without losing what already has been deleted?

If I close the terminal all records that has been deleted will roll back as it happened to before ?

Thanks

7
0 338
Question Nezla · Jan 26, 2023

Hi Guys

The navigation by default returns the Total records, how can I change that or allow the navigator to only show the number of records in the current page, or is there a property of Tablepane that returns the current page records No?

Thanks

0
0 196
Question Nezla · Jan 16, 2023

Hi Guys,

we are having a problem with the Cache.dat file is not expanding anymore since it has reached 2.2TB, we still have extra 260Gb of free disk space in our drive but for some reason it's raising a FILEFULL which is a result or the database not able to expand.

4
0 695
Question Nezla · Jan 10, 2023

Hi Guys,

I have a scheduled task that run every 5 mins to execute a function with 10 things to do, issue that those 10 thing are processed in a loop that takes more than 7 mins to finish, so basically I would like to understand what will happen when the task will run in next 5 mins given that the 10 things to do in my function from the first run didn't finish yet, would it ignore what's left from the 10 things to do and start again or the first run or would the first run  continue to execute in some job # and the new run will run in parallel with new Job#, and if that's the case would this affrect the system performance or is it better to expand my scheduled task eg.

1
0 262
Question Nezla · Dec 14, 2022

Hi Guys,

I'm trying to get head around this principle of instance variables and the advantage of it.

I found this principle used a lot by my predecessor  in some properties definition and I'm wondering why don't we just use the property as simple as is, its creating two properties sCtg that contain the value and Ctg is a calculate to get the value of sCtg, is there advantage of fast accessing or... !?

and also the use or  DISPLAYLIST &  VALUELIST does this brings any advantage vs defining a standard property (eg.

3
0 397
Question Nezla · Nov 30, 2022

Hi Guys,

Our clients are running Zen pages from Internet explorer and able to print with no issues but since they upgraded to Edge the can't print anymore, the user can select the printer from the listbox but it says "Printer Unavailable" ?

so far they installed MSDWebCient.msi  and also set Edge to run in IE mode following these steps :

  1. Click on the Options  button in the top-right corner of the Edge browser and select Settings.
  2. Click on Default browser on the left.
  3. Click the dropdown menu for Allow sites to be reloaded in Internet Explorer mode. Select Allow
0
1 504
Question Nezla · Nov 29, 2022

Hi Guys,

Our system admin has installed a new SSL certificate to replace the old one in our Windows server 2016.

So should it be ok to just then remove the old Certificate given that we installed the new one, knowing that the old one has been used previously or do we need to do something in existing SSL/TLS configurations ?

Thanks Guys

2
0 412
Question Nezla · Nov 19, 2022

Hi Guys,

I've this :

- NodeJS example,

let buf = Buffer.from('02010605166E2A0923100950205450524F424520303030323730', 'hex')

let temper = buf.readInt16BE(7) / 100

- Python example,

import binascii

buf = binascii.a2b_hex('02010605166E2A0923100950205450524F424520303030323730')

temper = int.from_bytes(x[7:9],byteorder='big') / 100

what would be the equivalent of this using Cache scripts?

Thanks Guys 

4
0 553
Question Nezla · Nov 9, 2022

Hi Guys,

My understanding is that SQL gateway connection is a way where you can have two ensemble instances where in instance A you can have a class and then you create a connection from instance B and you can run queries for that table from instance A into B?

But as I checked the doc, it says that SQL gateways is a way to just import data from an instance to another?

Thanks

1
0 528