Replies:

Hi Edmara!

Which IRIS version are you trying?

I did a test using the version "IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.2 (Build 368U) Fri Oct 21 2022 17:18:04 EDT" and all worked fine.

Please, checkout the example below on your IRIS version. It shows the index global value (^dado.TblTesteI) in order to get more visibility of what is going on.

dado.TblTeste:

 
Spoiler

dado.TblFieldOne:

 
Spoiler

dado.TblFieldTwo:

 
Spoiler

dado.TblFieldThree:

 
Spoiler

Output of OpenCompositeIndexTest() method:

IRISAPP>d ##class(dado.TblTeste).OpenCompositeIndexTest()
IRIS version: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.2 (Build 368U) Fri Oct 21 2022 17:18:04 EDT

Cleaning up tables...
Populating tables...

---
Test with FieldThreeId using SQL DML:
Ok
Index global: 
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",1,2,3,1)=""

---
Test with no FieldThreeId using SQL DML:
Ok
Index global: 
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",1,2,-100000000000000,2)=""
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",1,2,3,1)=""

---
Test with no FieldThreeId using object:
Ok
Index global: 
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",1,2,-100000000000000,2)=""
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",1,2,3,1)=""
^dado.TblTesteI("idxFieldOneFieldTwoFieldThree",2,1,-100000000000000,3)=""

HTH,

José

Open Exchange applications:
Followers:
Following:
José Roberto has not followed anybody yet.
Global Masters badges: