Question Alexandr Ladoshkin · Aug 3, 2018

Hello there,

I have some problem with inserting date to table using dynamic sql.

I have Country class. This table has relationship with class Continent as parent and child. In addition I have another statistic class where property Country has type of Country class. I get ID such as "1||1" next I execute dynamic sql INSERT INTO Stats(Country) VALUES("_CountryId_"). Then I select Stats table and see that value of Country column is "11") As a result a can't get Country object.

Please advice solution of this problem

Thank you

2
0 458
Question Alexandr Ladoshkin · Nov 23, 2017

Dear community!

I have problem with index NULL value.  Unique index doesn't work for this case.  If I use insert and one of parameter is "NULL". Message of constraint doesn't appear and row is inserted into table successfully.  How Can I use index with NULL?

Class TestClassIndx Extends %Persistent
{
Property name As %String [ Private ];
Property age As %String [ Private ];
Property country As %String [ Private ];
Index IndextestUniq On (name, age, country) [ Unique ];
}

INSERT INTO TestClassIndx (name,age,country) VALUES ('1','2',NULL)

Best Regards 

3
0 791
Question Alexandr Ladoshkin · Apr 18, 2017

Hello,

I work with trigger and I need afeter update make INSERT into LogTable value of prorerty of saved class.  This is what i have in this monent.

S className = ..%ClassName(1)
S cls=##class(%Dictionary.CompiledClass).%OpenId(className)
F i = 1:1:cls.Properties.Count() {
    S prop = cls.Properties.GetAt(i)
    S propName = prop.Name
    S value={propName*N}
}

How Can I get value given "prop".

Thank you

8
0 693
Question Alexandr Ladoshkin · Apr 17, 2017

Hello everyone.

I have some issue with trigger. I have class where I defined 3 triggers (UPDATE, INSERT, DELETE). These triggers are Foreach = row/object. In my currently task, I need overide this triggers in children class.  is It possible to do it? 

Thank you for your help.

4
0 421
Question Alexandr Ladoshkin · Apr 4, 2017

Hello everyone. I have some problem with selecting my own globals from namespace. My task is select only globals created by me.  Follow my code, I get all globals from given namespace. 

SET NAME="" F  SET NAME=$ORDER(^$GLOBAL(NAME)) QUIT:NAME=""  DO

Please help me with excluding system globals. I need work only with my own globals.

2
0 401