This is a lesson learned, which I would like to share with community.  

Recently I ran into an issue, where I was using %ConstructClone and it kept cloning extra records, which were not needed.  The record for which I was trying to run a clone had many-to-one relationships.  

The solution to this issue was using param -1.  If you run %ConstructClone(-1) it will not clone relationships, but rather just clone single oref as desired in this case.

I hope this information helps someone who is working with similar records.

0 0 128

I have a custom written date, setup as myDate in my application, which always behaved fine for years, and now it's acting a little weird. 

When I run SQL in Display mode the date shows as 1/10/1841 for some but not ALL rows.

When I run the same exact query in logical Mode the date shows normal format, in my case, for example 10/1/2019.  When the application is running is shows the incorrect date.  When I run the terminal session and open a ref point and ask to write a date is shows 10/1/2019, but I am expecting internal format here - 65287.   

0 4 122
Alex Kogan · Sep 5, 2019
Ambiguous sort column error


I have a small SQL question.  

Running an example queries in our Samples Namespace: 

1. select top 5 Description,Category from Cinema.Film order by Category - runs fine no issues and returns 2 columns as expected

2. select top 5 * from Cinema.Film order by Category - runs fine no issues and returns 8 columns as expected

3. select top 5 Description,Category,* from Cinema.Film order by ID - runs fine no issues, and returns 10 columns, with my first 2 repeated

4. When I try to combine the first 2 queries: 

0 4 68


I assume there is a simple explanation for this, but I do get <OBJECT DISPATCH> error, when I am trying to set a global to a value.

My example is huge, but I reproduced it using Samples namespace:  

First I delete the Title from ##class(Cinema.Film)  - 3 


SAMPLES>s ref=##class(Cinema.Film).%OpenId(3)
SAMPLES>w ref.Title

SAMPLES>set ^AK(1)=$G(ref.Title)

SET ^AK(1)=$G(ref.Title)
<OBJECT DISPATCH> *Property 'Title' in class 'Cinema.Film' must be MultiDimensional

0 4 266

Hello all,

I have an XSL question and I wanted to see if someone within a community can help me out.  

To Summarize: I am working with XSL documents, single and multi-pages.  
Inside my style sheet XML document, which is supporting my pages, everything on the page, including a headers, footers and the items are calculated 
based on the portrait measurements. 
Pages come up on the screen as portrait, but sometimes, depending on dynamic data are wide, they do not print properly in portrait.

0 1 148
Alex Kogan · 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 164

Hello All,

I hope it's not a silly question. 

Here is my issue:
I have 3 simple classes:

Parent class, let's say:

Class ParentClass Extends %RegisteredObject
 Property a As %String;
and two children classes
Class A.Child Extends ParentClass
Property b As %String;

Class B.Child Extends ParentClass
Property c As %String;

So no issues - all compiles and seem to work.

But, when I add %XML.Adaptor to my parent class, so:

0 3 411

My questions are regarding ClassMethods with a private keyword tags.

When we use a wizard to add a new method, we are given a options to
select private checkbox to make it a private method as well as 
Class Method checkbox in the same time. 

1. What would be the reason and the case to select and use them both?   
2. Secondly, if there is such a case in already developed application is it
safe to remove the private tag from ClassMethod? Obviously if it's not a 
ClassMethod private tag cannot be removed as easily.

Thank you,

0 11 275