Greetings,
How can I store a global name in a variable, ie: x="^G" and then use x like this, as if it were the global: y=$o(x) ?
Please advise,
Thanks...
InterSystems Caché is a multi-model DBMS and application server. See more details here.
Greetings,
How can I store a global name in a variable, ie: x="^G" and then use x like this, as if it were the global: y=$o(x) ?
Please advise,
Thanks...
Greetings,
If given a global, how can I discover information on that global? More specifically, how can I discover how many indices it contains? ie: ^G(1,2,3,4,5) How can I discover that there are 5 subscripts within the Global ^G if I did not already know.
Please advise, and thanks in advance for everyone's time.
It is my understanding that when a routine accesses a global it is temporarily stored in global memory. While the global is within global memory, any other routine would be able to readily access the global from memory and not from disk so long as the same node is being utilized.
For example, RoutineB() would be able to access ^Global(1) and ^Global(1,2) since RoutineA() utilized them, but RoutineB() would have to read ^Global(1,7) from disk as it was not utilized by RoutineA().
Hi everyone
Is there any way to change a class definition (especifically a query definition during the compilation time)?
The idea is:
I have an abstract class with a parameter where I will define the ROWSPEC of a query and some methods to populate e temporary table
The implementation class will override the parameter, specifying the ROWSPEC of this implementation, and the methods will populate the rows in the same format as the ROWSPEC.
I want to change the ROWSPEC of the inherit query according to the implementation of the overriden parameter.
Hi
I have two persistent classes defined. Lets call it Parent and Child.
Child class is one of the property of Parent Class.
I would like to define a index on Child class.
So what is the default behaviour I defined a index on a non simple data type member?
Any possibility that I could customized the behaviour ? For example. Child class has three properties.
Could I configure the index to index any combinations of these three properties?
Thanks for your help.
I'm trying to recreate a smaller copy of our DEV machine on a sandbox instance. I installed a new instance, and thought it would be a good idea to copy over a few cache.dat files from the critical namespaces (but not all of them), and start from there.
However, I can't compile any UI files in my new instance because I'm getting a <PROTECT> error on the %qCacheMsg global -- for any element that displays text (i.e. the first <label> that's encountered) the generated code is trying to get text from the global ^%qCacheMsg("%Utility","en",node) = text -- from a node that doesn't exist.
Hi,
I have a UrlMap like the one below.
What if I have to pass two parameters to QueryResults, how to do configure Url?
Something like Url="/Results/:queryID/:parameter2" ?
Thanks.
I have a query text that I need to execute and return results as xml.
It may be an SQL query or an MDX query. Is there some easy way to determine which one is it?
Any ideas?
Hi all,
We faced a problem where we would like to map a $lb object to its corresponding data model structure in order to later on export it as JSON.
So imagin that we have something like this that actually maps to a persistent table with its structure.
$lb("",,,,,"",,,"BOOLEAN","0",2,2,"1",,"bla",$lb(,,"bla","20050502123400"),"",1,"bla",,0)Is there a way to transform this $lb (without the need of openig the object itself) to a JSON object with the proper table fields as properties?
Many thanks
Hy.
I set up cache in container, which is working fine. But when accessing managment portal the default user was alway Unknown user and no username or password were required. So i disabled the Unknow user in the Security section, but now i keep getting an error access denid.
Hi!
I have a global-mapped class that I want to add a transient property through (or at least, not stored on the database). This property is the sum total of various charge classes that are linked to the class via child relationships.
I want this new transient property to be visible at least via SQL.
My current approach is to total it up in a ClassMethod called via SqlComputeCode. It seems to work, but feels clunky. I wonder if there is a way without passing the %%ID through? I tried it with $this but that only returns the object name in a ClassMethod.
Greetings,
How do I organize a wildcard search with respect to a database search?
Example of what I am trying to do: s x=$o(^G("ABC","A*",x))
Trying to navigate through the ^G global for all occurrences of "ABC", and "A*" ("A"+wildcard) but I am new to M and don't know positively how to do this. Perhaps I don't use an "*" at all, rather; another convention altogether.
Please advise.
Thanks in advance for everyone's assistance.
Hi everyone,
I have a project which requires the sending of JSON messages to an external service provider using REST. The service provider requires the message contents to be signed.
Their instructions:
Hi, Community!
And so I continue with publishing of the tasks for the Final round of InterSystems Contest on InterSystems Caché and DeepSee as a part of IT Planet Student Championship in Sochi. This year we had about 2 000 participants in InterSystems Contest.
One of the tasks for the finals was to crack the black box and another to output 9876543210!
Here's the next task: gravity!
Greetings, can someone give me some help? I'm trying to use job for a instance method, as it's described here but...
Anyway, I have a method like this:
Method PrepareInstance(path)
That is being called like this:
%Status
But it fails because:
Am I missing something or is that a bug? The method surely exists and the job is also being created inside another instance method.
Thanks in advance.
HI Community,
I do have a table with quite some names written in Uppercase:
To simply correct this, I have created a button with some code behind it.:
ClientMethod convertToTitle() [ Language = javascript ]
{
var ctrl = zen('Relation');
tVar = ctrl.getValue();
tVar = this.StringConvert(tVar)
zenPage.getComponentById('Relation').setValue(tVar)
}
ClientMethod StringConvert(str) [ Language = javascript ]
{
///alert (str)
str = str.substring(0,1).toLowerCase() + tVar.substring(1).toLowerCase();
///alert (str)
var pieces = str.split(" ");
for ( var i = 0; i < pieces.
I am working with Caché Relationships.
I know how to iterate through the One side of the relationship and for each One iterate through all the various Manys.
What I have been trying to figure out, is the code (I can put into a Class) that will start at the top of the Manys, iterate down and for each of the Manys, pull the associated One.
I can do this with SQL or Globals, but I want to use only Class type code.
Is that clear? Any help?
hi
I want to create one class and add one method in it, and then invoke it from terminal. I find this
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
But there is only examples for adding property.
Anyone can help me? Thanks
You might find it useful or not. It depends on what you can imagine it to be used with, like I had to.
Either way, I created a lib that can fetch environment variables from a file or from the OS where Caché is running.
Mostly know as dotenv. Many languages have it, so why not Caché?
The usage is pretty simple:
If you want to use OS env vars exclusively, just use the method:
##class(DotEnv.Parser).FromOS()
Otherwise, if you want to specify a .env file containing your variables to complement the OS ones use the method:
##class(DotEnv.Parser).FromPath("/path/to/file")Greetings,
I am working on the first of many triggers which will have identical code upon row insertion or update of a single column. According to the document I should be able to define a multiple-event trigger using Cache SQL/DDL.
Here is a link to the current CREATE TRIGGER documentation. Within the description section is the following paragraph:
A single-event trigger is triggered by a specified INSERT, DELETE, or UPDATE operation. A multiple-event trigger is defined to execute when any one of the specified events occurs on the specified table.
Hi, folks!
I need to get the source code of a class installed on a remote server. I have no Studio or Atelier access to it but I can manage REST and Web terminal access.
What is the easiest way for me to make it?
Beginning - see Part 1.
A structure, such as an ordered tree, has various special cases. Let's take a look at those that have practical value for working with globals.
Quotes (1NF/2NF/3NF)ru:
Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else). The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
- atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
- non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)
This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".
Hello,
I'm currently exploring alternatives to CSP/services and ODBC/Sql Maps for access to Caché. I'm not seeing a library which would interest me, so am considering creating one myself.
Does 'CacheConnection' in C# use RPC of some sort, or a defined protocol to communicate with Caché, or does it do so over telnet with scripted commands? I would assume the former. If so, is this a publicly documented protocol that can be implemented by library developers?
Any guidance in this area would be appreciated.
hi
I restored one database on Server B with EXTSELCT^DBREST command from backup file (this backup file is taken from Server A).
When I execute select some rows from one table, it return error like this,

the same select sql can return correct data in server A
But when I select other rows from same table on Server B, it return correct data.
Why? maybe the backup file corrupted?
Thanks
I have a stored procedure like below:
Call USER.SP('select * from Sample.Person where SSN='aaaaa'','0','S')How could I escape the single quotes for aaaaa? I try double single quotes but in vain.
Thanks you.
"SELECT %SYSTEM.SQL_TableExists('table name') "could work as expected under SQL shell,
but for "CALL %SYSTEM.SQL_TableExists('table name')" does not work (not any error reported, it just show nothing).
Is there any reason why CALL could not be applied to a stored procedure?
Thanks.
hi
I execute sql from Terminal
SET result=$SYSTEM.SQL.Execute("SELECT TOP 5 name,dob,ssn FROM Sample.Person")but I got error "<METHOD DOES NOT EXIST> *Execute,%SYSTEM.SQL"
Why?
Thanks
Hello. I am a student from Syktyvakar Forest Institute(Russia).
I need to make Research : "Databases for working with spatial data
Consider MySQL, PostgreSQL and 1 to choose from". I want to explore Cache with subject library of spatial data.
Help.
Does Someone from the developers write the libraries of spatial data?
Caché offers a number of methods for going through a collection and doing something with its elements. The easiest method uses a while-loop and lets you fulfill the task in an imperative manner. The developer needs to take care of the iterator, jumping to the next element and checking if the loop is within the collection.
But is it really what a developer should be concerned with?