I have a unique index on two properties in a class, and I want to open the instance by index key with one of the two properties is set to the empty string. Is this possible to perform?
Take the example class here
Class TestIndex
{
Property Mandatory as TestClass [Required];Property Alternate as TestClass;Property AltOrEmpty As%String [ Calculated, Required, SqlComputeCode = {Set {*} = $Case({Alternate},"":$c(0),:{Alternate})}, SqlComputed ];
Index AlternateMandatory on (Mandatory, AltOrEmpty) [ Unique ];
}And example data as
| Mandatory | Alternate | AltOrNUL |
| 2 | ||
| 2 | 3 | 3 |
(1).jpg)
📌 Below, you can see all the greetings shared by Global Masters members. They remind us of how important it is to be part of such a united and creative community. .jpg)
.jpg)
.jpg)

.jpg)

