This is a quick note on what happens when, on your CSP page, you call a cache script which returns a %Boolean and store that value in a javascript variable.

When you call a script with language="cache" and returntype="%Boolean" from a javascript script, the return value is interpreted as a string, not as a boolean.

Here's an example:

A cache script that returns (in theory) a "false" value:

0 3
0 516

Hi -

I'm wondering if anyone has coded up a means to create an extension for a %Persistent class from a base class to a sub-class without making a ton of assumptions about the Global structure. I'm trying to create a new "extension" record that would have the same ID as the Base Class

Class BaseRecord Extends %Persistent

and

Class SubRecord Extends BaseRecord

where I would have an instance of a "BaseRecord" and I want to turn it into a "SubRecord" instance and have all of the existing references to the BaseRecord survive.

0 7
0 406

Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.

Can anyone share any examples?

Thanks

Scott

2 9
1 1.4K

Hello,

I am pretty stuck here and would appreciate any help or advice on an approach to this...

I have a single claim file, ingested that has 7 claims inside of it, I am pulling each claim out based on a qualifier, then want to remove all of the others and do something with the one that is left over.

My problem is I cant seem to figure out how to Remove the Claims programatically...

0 1
0 236
Question
· Dec 3, 2018
Rest return 500 error

I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on.

0 2
0 449

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 525

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 942

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

Hi,

I would like to know if anyone has had some experience in building systems for multiple end-users.

To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times.

If I wish to offer such a system to many Venues, there are a number of options available.

0 6
0 1.7K

Hi all,

We are moving to IRIS our productions, and everything seems to go fine. But we are facing a problem because we are using the object %Library. CacheObject in some classes, and IRIS doesn't seem to recognize it. At the IRIS documentation (https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls) the object is effectively removed, and I can't find the equivalent.

Has anyone faced this? Which is the new object in IRIS?

0 3
0 360
Question
· Oct 18, 2018
$match or "?"

Hello all...

Is there two matching patterns in Caché, is there a difference in use one or the other?
Example:

USER>set a = "(1234)"

Using $match.

USER>w $match(a,"\([0-9]{4}\)")

USER>1

Using literal match (sorry if not correctly term expression)

USER>W a?1"("4n1")"

USER>1

What is different from using one or the other?

The 'a?1"("4n1")"' does this pattern exist only Caché.
Exists performance improvement with use pattern Caché?

0 2
0 540

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