#Caché

30 Followers · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Rui Figueiredo · Jan 4, 2018

Hi, 

I would like to set the report headerHeight dynamically based on a group records count.

Example:

If GroupA has 5 records then the headerHeight should be 50mm

If GroupA has 3 records then the headerHeight should be 30mm

Could you please advice the best approach to achieve this?

Thank you,

Rui

1
0 290
Question Daniel Kutac · Feb 6, 2018

Is there an API that would list classes within a given package? I can't find any. I do have a workaround that uses class index, but this query lists all classes available in the namespace and I have to filter those I want. But this is just unnecessary overhead.

If anyone has spotted such API, please let me know.

TIA!

Dan

3
1 1344
Article Titto George · Feb 5, 2018 2m read

Zen report can create PDF document (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GRPT_xslfo_pdf_config ). Store your images in the table. Pass session id to the Zen report. Zen report will select images using SQL. The <img> element will insert images to the report:

<img width="100%" src="!@ImageName" contentHeight="scale-to-fit" contentWidth="#(..ImageWidth)#" style="position:absolute" content-type="image/jpg"/> 

Do the following (See the attachment image_to_pdf_using_zen_reports.doc for details):

0
0 796
Question Eduard Lebedyuk · Feb 5, 2018

Currently to check if the class  is mapped I call:

ClassMethod IsClassMapped(class) As %Boolean

{
  set sc = $system.OBJ.GetClassList(.classes,"/system=0 /percent=0 /mapped=0")
  quit $data(classes(class))
}

And it works, but I'm interested if there is a simpler approach out there?

2
0 440
Question Minsu Kim · Feb 5, 2018
Hi global developers!

I am using terminal but I have some problem with it.

I use $C(1) (ascii code 1) to separate data but I can't see it in the terminal and This is really hard to see in the table.

So I want to get you guys good brain and skill :)

how can I see it in the terminal ?

Terminal(intersystems) :

I can't see anything

another program :

It replaced ascii code 1 (=SOH) to  ┌ (Special Character)

I want to see like another program in Intersystems's terminal.

Thank you smart developers!

3
0 510
Article David Loveluck · Feb 1, 2018 1m read

Here is a snippet that I learned yesterday

You can define an index on a collection property but when I tried to use it, I failed. I was using

     Select ….. where …. :xx %INLIST collproperty

But this will not use an index, but the equivalent syntax

     SELECT .. WHERE ... FOR SOME %ELEMENT(collproperty) (%VALUE=:xx)

will use the index 

Check out

     http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

Dave

2
1 411
Question Hemang Patel · Feb 1, 2018

Hi 

I am new to cache and accessing it using odbc (other data sources) from excel. I need to know how to get hold of the number of rows for each every object in my current schema. 

I can find table name using following query but I need number of rows to estimate size of each table.

SELECT *
FROM %Dictionary.ClassDefinition ClassDefinition
2
0 1484
Question Pravin Barton · Jan 31, 2018

This might be more of a math problem than a Caché question.
I have a SQL query that joins two tables. I want to assign a unique ID to each row of the product table.

  1. I could append the GUIDs of the rows in the two tables, but there are a number of clients that expect a maximum length of 50 on this unique ID. Two GUIDs appended make 72 characters.
  2. I could append the two GUIDs and then truncate the result, but now I'm worried about collision.

What's the chance of collision if I append the GUIDs and truncate the result to 50 characters? Is there a good way to solve this without updating the clients?

12
0 1899
Question Thembelani Mlalazi · Jan 30, 2018

I am trying to write an application that will take some information on the database make a call to the Google API distance matrix and get the information to use with rest of the application without using the ensemble part of the development is this possible and how can I do my communication with the  API from a cache class thanks in  advance

7
0 1473
Question Scott Roth · Jan 30, 2018

We have noticed in the course of the last 18 days our CACHE.dat has grown by 20 GB. Is there a way we can break down the data in CACHE.dat to see what could be growing in size?

Let me state it another way.....Is there a way to see what space an Operation/Service/Process is taking up within a certain Production?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

3
0 1593
Question Virginia Rogers · Jan 29, 2018

Hello,

I have a property which I need to move from one class definition to another as follows:

Old definition:

Class SCHED.SchedEntry
{
  
  Property Experiment as %String;

  Property ScanSlot as list of TracerEntry;

}

Class SCHED.TracerEntry
{
  
  Property Tracer As %String

}

I want to move the Experiment property to the TracerEntry class so that there is a different Experiment allowed for each ScanSlot, like this:

Class SCHED.SchedEntry 
{

  Property ScanSlot as list of TracerEntry;

}
2
0 432
Question Alfred Schmeer · Jan 29, 2018

Looking at the documentation expalining the use of client side menus, including the drop down menu.

I was messing around trying to get the "Open", once clicked, to use javascript to open windows file explorer to open/pick a file.

I've got it to partially work... Using keystrokes Ctrl-O will open the file explorer yet clicking on the drop down's File/Open does nothing.

Not sure what I'm doing wrong here.

NOTE:  I had commented out the two &html lines in the Testing Method... and doing a Ctrl-O still work.

Why?

2
0 444
Question John Murray · Jan 30, 2018

In part of this post in 2016 @Eduard Lebedyuk asked if anyone knew what is meant by an "expanded class", as referred to in the text that appears when we run the ShowQualifiers classmethod of %SYSTEM.OBJ thus:

SAMPLES>DO $system.OBJ.ShowQualifiers()
...
            Name: /checkuptodate
    Description: Skip classes or expanded classes that are up-to-date.

3
0 541
Question Mack Altman · Oct 11, 2017

We will be transitioning from a server running HP OpenVMS to one running RHEL 7. The main question some of the team had was what would be the best method for moving the globals to the new system.

Also, I was wondering if any others have transitioned from OpenVMS to RHEL. If so, were there any kinks that we should be aware of prior to transition?

2
0 1014
Question Trevor Strong · Jan 25, 2018

Does anyone know where the default port comes from when installing a new instance on Windows Server 2012 R2?

It constantly picks up the wrong default which is already running on the server (probably swapped over after installation)  and the install fails and rolls back.

I installed again and this time without rollback but still allocated the wrong port so at least was able to manually update the cpf and then start the instance.

Would like a simpler solution to the issue and assume they are traversing some windows registry entry that may need updating.

3
0 816
Question Soufiane Amroun · Jan 23, 2018

Hi community ,

i use postman for testing my request , i need to extract access token from it (i put it inside the "Get url" using post man before sending my request).

i use the GetAccessTokenFromRequest of (%SYS.OAuth2.AccessToken) class , but in my rest code party , when i send request from post man , i can't extract my access token, it's empty.

can please give me help?

thank you

1
0 362
Question Andrei Luiz Nenevê · Feb 24, 2017

Hi,

My doubt is about the SQL Query in Caché:

I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.

So, how can I do this, without losing performance, there is any way?

NOTE: In other SQL languages I can do, for example, SELECT * FROM extbl Limit 10 OFFSET 10

Thanks,

Andrei L. Nenevê

8
1 3583
Question Iain Fletcher · Jan 23, 2018

Hi

Is it possible to include the ≥ or ≤ in a ZEN select component?  i.e. 

<select id="condition" label="Condition" valueList="&lt;,&gt;,=,≤,≥" displayList="&lt;,&gt;,=,≤,≥"/>

I have tried &ge; and &le; but these also do not work.  If I inspect the options in the browser and edit with these characters they display correctly but just not when loaded in the zen page.

Cheers

Iain

10
0 397