Caché

Syndicate content 118 

I have a Zen Mojo application, developed using Bootstrap plugin and using "Explicit Dispatch" with multiple templates.

I have every template representing an specific area of my application (customer, order, logon, application settings, etc.). 

Each template has specific code,  client side validation and so on related to its areas by using javascript.

So, I would like to know if it is possible, for example, through my order template call a javascript function from another template (e.g.: customer), where I there is functions for document id validation, date of birth validation, etc.?

Thank you.

Last answer 19 July 2016 Last comment 19 July 2016
0   0 1
177

views

0

rating

I have two pages and I am using the push and pop to go and back navigation. When I click the button forward and back in the browser, I can't navigate more between pages.

 

The following code:

Page 1 - onSelect Method:
var obj = {idExame: VALID, objUsu: ObjUsu};
zenPage.gotoArea ('itemexames', key, key, false);
view.pushDocument (key, obj, key, obj);


Page 2 - onSelectMethod, back:

var documentKey = "PacienteExamesinitial";
var layoutKey = "PacienteExamesinitial";
var area = "pacienteexames";

view.popDocument ();
zenPage.gotoArea (area, layoutKey, documentKey, false);

 

I am using ZenMojo with Bootstrap.

Can someone help me?

Thanks

Alexandre Marques

Last answer 19 July 2016 Last comment 19 July 2016
+ 1   0 4
198

views

+ 1

rating

I don't know if this is the proper section to post this kind of issues, but in the learning tracks for Zen I'm not able to play the second video (Caché Demo - Part 5 - Building a Rich Web Interface with InterSystems Zen) , the player show the following error message:

No video has been loaded

Error Code: PLAYER_ERR_NO_SRC

Learning Trak Link:

https://community.intersystems.com/learning-track/zen-videos 

Last answer 18 July 2016
0   0 1
0

comments

151

views

0

rating

I am looking for a database management tool I would have expected to find something like on the SMP website

 

Aim

show current database usage (ie size allocation) by database then table etc and allow continued drill down,

show information as a table, so can then sort by size to find the biggest item easily

also show it graphically

 

And then have ability to track and trend growth in size over time

identify a normal growth pattern

alert if variation (higher or lower) from normal based on recent trend

 

is there a tool that can do this, or a 3rd party tool, even it can only operate via standard SQL JDBC/ODBC to get a partial view.

 

Or, how else do people manage and track size?

 

Last answer 18 July 2016
0   0 2
0

comments

587

views

0

rating

Hello, guys.

I have an external file that contains data in UDL format(as in Studio, not XML) and I need to somehow overwrite my source file with that file. 

I tried to use this snippet for .mac file

 set rtn = ##class(%RoutineMgr).%OpenId("les.mac")
 rtn.Code.WriteLine("some text")

Last answer 15 July 2016 Last comment 15 July 2016
+ 2   0 2
312

views

+ 2

rating

I'm new to Cache and trying to follow the Using Cache Studio PDF. In section 2.4.3(Adding a Zen form) it tells you insert the following code;

<button caption="Save" o select="zenPage.saveRecord();" />

Unfortunately that code fails compilation. If you try and use the tools there is no o select option nor a select or onselect option. I was wondering if anyone has used this PDF before and knows what the correct attribute should be?

 

Last answer 15 July 2016 Last comment 14 July 2016
0   0 1
98

views

0

rating

Customer is experimenting with %vid variable for selecting row numbering for sql queries. Basically he's trying to implement paging functionality.

He is confused that select %vid from (select ...) returns dummy number whilst select *,%vid from (select...) returns correct data.

I believe, according to the documentation...

Last answer 1 July 2016 Last comment 15 July 2016
0   0 2
543

views

0

rating

I have the following problem:

  • There are several classes with method generators, which needs to be compiled during every compilation
  • I have "ckub" qualifiers enabled in studio
  • I don't want to remove "u" qualifier because I need it very much in another namespaces

So how do I force classes with method generators to recompile when "u" qualifier is present?

Last comment 15 July 2016
0   0 2
0

answers

516

views

0

rating

NewBie's Corner Session 13 .MAC and .INT Routines and Comment Lines

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

.MAC and .INT versions of Routine

Save Routines with a .MAC Extension

When saving your routines, be sure to specify a .MAC file extension (the default) and not a .INT extension.  The .INT version of a routine is an intermediate version of the routine. It is in the .INT version of a routine that the SQL Code (and other code) from the .MAC version is expanded upon.  I know the VA (Veterans Administration) routinely uses .INT extensions and they get away with it because they know how to do it. But I strongly suggest any NewBie use a .MAC file extension, which is the default.

I know others may disagree with me, well their entitled.

Comment Lines

0   0 1
0

comments

204

views

0

rating

NewBie's Corner Session 3 More Read and Write commands & Multiple commands

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Write command with carriage return and line feed

When the exclamation point "!" is inserted after a Write command, a carriage return and line feed combination is produced. Note in this example, that a comma separates the exclamation point from the variable "X"

Last comment 14 July 2016
0   0 2
228

views

0

rating

Hello, everyone!

I opened one project and there I found such lines as 

$$Export^%occXMLExport(filename,"-d /diffexport",InternalName)

Do DecomposeStatus^%apiOBJ(sc,,"d")

The problem is I can't go to their definition and find them in documentation. It says that they don't exist on the server. However, the project works and these routines execute. 

Last answer 12 July 2016 Last comment 14 July 2016
+ 1   0 2
333

views

+ 1

rating

The Caché System Management Portal includes a robust web-based SQL query tool, but for some applications it’s more convenient to use a dedicated SQL client installed on a user’s PC.

SQuirreL SQL is a well known open source SQL client built in Java, which uses JDBC to connect to a DBMS. As such, we can configure SQuirreL to connect to Caché using the Caché JDBC driver.

Finding Caché’s JDBC driver JAR

The JAR file containing the Caché JDBC driver is installed automatically by the Caché installer when installing a full Caché instance or when installing client components only. It can be found in the lib directory under the main installation directory.

For this Caché client installation on a Windows PC, the JAR file can be found at this path:
C:\InterSystems\CACHEClient\lib\cachejdbc.ja

Last comment 13 July 2016
+ 7   0 9
2651

views

+ 7

rating

InterSystems is pleased to announce that Caché and Ensemble 2015.2.4 are now available as maintenance releases.

For a complete list of the corrections in 2015.2.4, please review the release notes

Caché and Ensemble 2015.2.4 are available for the same platforms as 2015.2.3, with this exception:

  • Red Hat Enterprise Linux 7 for Power System-64 has been dropped.

The complete set of supported platforms, including specific point releases and patches, is detailed in the Supported Platforms document.

The build corresponding to this release is 2015.2.4.903.0

+ 2   0 1
0

comments

182

views

+ 2

rating

We can override soap body by using WriteSOAPBodyMethod. Something like:

Method Online(ByRef Obj1 As myClass1, Obj2 As myClass2, Output ObjOutput1 As myClass1Output(XMLNAME="Obj")) [ ..., WebMethod ]

{

              …

              s ..WriteSOAPBodyMethod="override"

              d (..WebMethod("Online","ProcessRequest")).Invoke($this,"Online",.Obj1,.Obj2,. ObjOutput1)

              s ..WriteSOAPBodyMethod=""

              …

}

Method override(proxy As %SOAP.ProxyDescriptor, tag As %String)

{

              …

}

In order to generate soap body, how can one  access  Obj1 and Obj2 from within the override method?

Last answer 13 July 2016
0   0 1
0

comments

168

views

0

rating

Hello,

One of our AP would like us to provide the file upload/download sample code by using ZEN Mojo.

I already provided them the attached "upload-sample".

I tried to create the "download-sample" in a similar way, but I couldn't do it yet.

Does anyone have a good idea/sample about this?

I'd like to download the server side file(e.g. c:\temp\nene.jpg) into client machine with a OpenFileDialog(image.png).

 

Thank you in advance.

 

Last answer 13 July 2016 Last comment 13 July 2016
0   0 0
553

views

0

rating

Hello, guys!

I want to get access to the folder where all files of the namespace are stored using COS. I found a way to get access to class files and found a folder where all csp, html, css etc files are stored.

However, is there any folder which contains all files(even .mac and .int)?  

Or, probably, there is a method which gives all files content?

Last answer 13 July 2016
+ 1   0 2
0

comments

170

views

+ 1

rating

Hi!
There is interesting question in Stackoverflow.
This query works for MS SQL:

SELECT * 
FROM 
(
    SELECT *, ROW_NUMBER() OVER (PARTITION BY client_id ORDER BY date_updated DESC) AS rn
    FROM client_address
) a
WHERE a.rn = 1

There is one answer there,  which solves the task:

SELECT *
FROM 
   client_address a
   LEFT JOIN client_address b
   on a.client_id  = b.client_id 
     and a.date_updated < b.date_updated 
WHERE
   b.client_id is null

But it goes with comment, that there are no Window functions in Caché SQL.

I wonder, are there any other options to make this query in Caché?
 

Last answer 10 July 2016 Last comment 12 July 2016
+ 2   0 0
1040

views

+ 2

rating

I've been trying to write a method to compare two local variables, which may be arrays, for "equality" - that is, to see if they have all the same subscripts (if they're arrays) and values. This is the best I've come up with so far - are there any better/simpler approaches out there

Last answer 11 July 2016
+ 1   0 1
0

comments

649

views

+ 1

rating

NewBie's Corner Session 12 Do and Goto

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

InterSystems Caché provides a GUI (Graphical User Interface) based Integrated Development Environment (IDE) called Caché Studio. Developers can use Studio to create and maintain applications.

Controlling Process Flow

Controlling Process Flow means controlling the execution path of code. The execution of code flows from the top to the bottom in a routine, except for the following:

•             Do and Quit commands

•             Goto command

•             Inline Do command (in a later session)

•             Structured Code (in a later session)

Do and Quit commands

0   0 1
0

comments

149

views

0

rating

Does anybody know how can I get the DocumentId property from a DocDM repository using SQL?. So far my SQL is like this:

SELECT name,email,gender FROM JSON_TABLE(
  'person',
  '$' COLUMNS(
    name VARCHAR(100) PATH '$.name',
    email VARCHAR(100) PATH '$.email',
    gender VARCHAR(2) PATH '$.gender'
  )

Thanks!

Last answer 8 July 2016 Last comment 8 July 2016
0   0 1
163

views

0

rating

NewBie's Corner Session 11 Routine Line Types and Gotos

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

InterSystems Caché provides a GUI (Graphical User Interface) based Integrated Development Environment (IDE) called Caché Studio. Developers can use Studio to create and maintain applications.

In this session we will cover Routine Line types; which are Label lines, Executable code lines and the Routine Header line as well as Gotos.


Routine Line types
Labels and Executable Code lines

Executable Code lines starts in column two, or many developers just hit the tab.
Label lines start in column one. Labels are the targets of the Do and Goto commands.


For Example:


START            ; Label
    Set X=5        ; Executable Code line

0   0 1
0

comments

172

views

0

rating

I am writing a static SOAP response to simply test connectivity. The end users is getting an error "Message: The processing instruction target matching [xX][mM][lL] is not allowed.", which I believe is related to white space. if I observe the response, it looks like there are two blank lines between the header and the body, which I'm guessing is the white space problem. But I can't seem to get rid of it.

Any ideas?

Code:

Last answer 7 July 2016 Last comment 7 July 2016
0   0 1
521

views

0

rating

I need to pass an equivalent of .Net Dictionary<string, int> instance from .Net to Caché. In the application, the Caché .Net provider has been used so far, so we came up with passing it as an instance of array of data types. However, the only way to fill the array we are aware of is to use its Add() method which invokes a call to the server instance method of the array for every key-value pair inserted.

Is there any way to fill the array at once - inserting all the pairs in one server call? Alternatively, is their any other .Net (Provider or eXTreme) API we can use for this task?

I know that using the Light C++  binding, we could pass the arrays as std::map<d_string, d_int> and a .Net equivalent of this using Dictionary<string, int> would be just perfect..

Last answer 5 July 2016
0   0 3
0

comments

419

views

0

rating

NewBie's Corner Session 8 Not

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out these commands.

NOT operator ('), single quote or apostrophe 

The "NOT" operator reverses the truth-value and is intended for numeric operands, however it can be used on alphanumeric operands

Last comment 4 July 2016
0   0 4
308

views

0

rating

在Aix7.1上安装使用root用户安装cache2016.1.1.107,且在安装过程中创建cacheusr用户;更改操作系统上的cacheusr的umask后,通过数据库修改编译后的文件(如,js,csp等)在小机上查看权限不变(-rwxrw-r--  cacheusr cacheusr test.js)。

目的:通过数据库编译后的文件的other用户有读写权限。

Last answer 3 July 2016 Last comment 1 July 2016
+ 5   0 2
400

views

+ 5

rating