Question
· Nov 26, 2018
BPL - Foreach IF statement

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation.

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

0 3
0 709
Question
· Nov 22, 2018
Embedded SQL bug?

Hi

Is this a bug? We came across it on an older version of Cache but I've also just tried it in version "Cache for Windows (x86-64) 2017.2.2 (Build 865U)" and got the same result.

Create a Class like so:

0 2
0 523
Question
· Nov 21, 2018
Short Cuts and Tweaks to Studio

I am quite new to Studio and I have been a Microsoft guy for a very long time and spoilt because of the short cuts provided and the flexibility of the IDE. Any tips and tricks for me to make my life easy while using the studio?

0 1
0 222

For each instance of an XML-enabled class I want to control whether a property is projected as an empty element or not projected at all. With string properties, I can set the value as $c(0) for an empty element, or an empty string for no projection. But it looks like this isn't consistent for properties with type %Boolean or %Integer. With booleans $c(0) gets projected as "false". With integers $c(0) stays as a zero-width space in the XML output (which gives me a SAX parser error if I try to read it).

Is there a way to do this that works for all datatype properties?

0 2
0 523

Hello ,

I want the datagrid to reflect values based on the value i select in the Combobox. How to pass value from the combobox to the

altJSONSQLProvider parameter and reload the datagrid ?

My combobox defines below method on change.

onchange="zenPage.rowSelected(zenThis.getValue());"

<altJSONSQLProvider id="PatchClassJsonId" OnGetSQL="GetSQL" >
<parameter paramName="1" value="C"/>
</altJSONSQLProvider>

<dataGrid

,......

</dataGrid>

0 1
0 199

Just got the new beta version of Docker, with depreciation warning of AUFS. It's so bad news when InterSystems does not support used by default storage driver overlay2. Recently I thought to play with Google Kubernetes Engine, and realized that I can't work with InterSystems products there due to incompatibility with Storage Driver. Maybe it's already time to think about support?

4 5
0 731
Question
· Nov 19, 2018
JSON Syntax

Hi,

I'm using InterSystem Cache v2015.2.5 and I'm implementing a REST API and returning JSON.

Following the documentation I see examples like this

Set obj = {"destinations": ["London","Madrid","Tokyo"]}
Write obj.%ToJSON()

However, I have a compilation error

ERROR #1054: Invalid expression : '{"destinations":'

Is there something that needs to be enabled on Studio to allow this syntax?

Thank you,

Rui

0 5
0 473

I created a custom class for a process that does some basic manipulation to an HL7 message. I'd like to be able to write some debugging to the process event log. How would I do that?

I've tried ##class(Ens.Util.Trace).WriteTrace("system","HOSP.IHE.PDQProcess","MessageHeaderHandler","Discarding input message")

but I get a runtime error when I try that. I know this is pretty basic stuff, but any help would be appreciated.

0 2
0 723
Question
· Nov 16, 2018
Detecting Source Code Change?

Is there a responsive way to detect a source code change without using a source control hook?

Update

I have my own custom unit test tool which has lots of extra functions that I find useful such as Asserting HL7 Transformers and REST targets.

I have a studio hook that will send an event signal to my test runner that will automatically re-run a specific test class or test suite, for which I have a test runner viewing page that updates with the results.

1 8
0 474
Question
· Nov 15, 2018
SQL calculated property rollback

Greetings all,

I have a quick SQL question. I am working with a class, which has a calculated property, which in turned indexed.
The calculation for this property is created based on another property value via:
SqlComputeOnChange = attributes - so basically every time I add a property attribute to my class, my new property
is calculated based on some SqlComputeCode which calls some class method.

That initial setup works as designed.

0 1
0 259

I need to write a script to answer a couple of fairly simple questions:

1) What is the current routine DB (name and location) for this namespace?

2) What is the current data DB (name and location) for this namespace?

3) Is global ^ABC mapped to a different location than the default data DB?

Can anyone point me to some system APIs that would allow me to answer these questions?

Thanks!

Ben

0 2
0 439

Can anyone tell me how to discover in ObjectScript the operating system and operating system version that Caché is actually running in? (Not the operating system the build was compiled for.)

0 11
1 983

I am trying to use the automated unittest class for a %CSP.Rest service.

So my Unittest code set's %request and %response from %CSP.Req/resp respectively

I build a tProxy with the fields I need for the post and set it %ToJson... I have tried seting %request.Content = tProxy (and not)

I call the method for the post url directly...

When that method calls %fromJson to set an object with the info. I passed...

- when I don't set %request.content.. I get a error '5035 - premature end of data code 12'

0 7
2 1.1K

I need to dynamically create a class based on a parameter passed into a class method. Basically the method takes in a string that contains the name of the class I need to create a new instance of.

I need something along these lines.

ClassMethod someMethod(className As %String)
{
	set classObject = ##class(className).%New()

...
}

Trying to do this right results in a class not found error because it seems to be treating the variable as a literal string.

0 3
0 937

Has anyone worked out a way to use LDAP to define the default namespace on multiple servers? I know that documentation says that intersystems-Namespace-xxx only supports one namespace, but how is this useful? Any workaround to say have intersystems-Namespace-server1-namespaceA and intersystems-Namespace-server2-namespaceB? Is it best practice to use the same "namespace" on every server?

Thanks!

0 1
0 244

I downloaded and installed the trial version of Caché.
it is installed in c:\intersystems\Trycache
I changed the system environment settings so that
GLOBALS_PATH = c:\intersystems\Trycache
and PATH includes c:\intersystems\Trycache\bin
Caché works, and I can login, use the globals, etc...

0 1
0 313
Question
· Nov 1, 2018
Pattern Match with Cache

I'm trying to interpret a ObjectScript pattern and I am stumped on the first part. I understand everything else but not sure what 1.A means. I know A stands for Alpha characters just not sure what the 1. means

0 3
0 507

I can directly order over a MultiDimensional property, e.g.

set key=$order(obj.prop(key))

However I have a generic method that has to use the $property method, if I know the keys then I can just fetch a value with...

set value=$property(obj,"prop","key")

But if I don't know the keys then I am not aware of a solution to do this, e.g.

set key=$order($property(obj,"prop",key))

will not work.

0 6
0 441
Question
· Oct 30, 2018
MSSQL Data Warehouse

Hello,

I have been trying to pull data through a linked server in SSMS from an InterSystems Cache Database for a while, this is to enable us to join the data to other source systems in our Data Warehouse.

I have set up an ODBC connection and a linked server to the database and can execute queries through OPENQUERY in Management studio, but the data is huge (> 100million rows). So when I execute a SQL query with a WHERE clause the query just spins.

0 2
0 786

I'm trying to execute a nodejs process to perform some work on a string from Cache/Mumps over to nodejs, then return the result from nodejs as a string back to the code in Cache and I was looking at the `$ZF` logic - it will let me output the results to a file (i.e. temp.txt) but I dont see a way to just get the output set back to an M variable like (and I know this is not the correct syntax, but just for example)

S myOutput=$ZF(-100, "echo something") ;; wrong syntax but just for example

W myOutput ;; want to write out "something" but of course this doenst work

0 4
0 923
Question
· Oct 30, 2018
ID vs %ID in tables

What is the difference between %ID and ID in a database table? Both seem to reference the same column labelled ID.

For context, I am trying to create a viewer class for an existing persistent class.

Let us call the persistent class A, with SqlTableName = OldA.

The viewer class will be B with SqlTableName = A and ViewQuery = {select %ID, <other fields> from <some other class with the same fields as A>}

0 1
0 1.1K