SQL CLASS NODE SYNTAX
I HAVE A NEW SQL CLASS THAT DISPLAYS ENTRIES BASED ON THE FIRST 2 NODES OF A GLOBAL. I FOUND OUT THAT THE CLASS ALLOWS FOR AN ADDITIONAL NODE(s) TO BE INSERTED IN THE "User Specification Node:" along the delimiter and the Piece in the NewStorage Map1 for "ModifyDDDD" shown below. it is not working.
^GBL("AA","SSSSSS")="1:1:1:1:"
^GBL("AA,"MD",1,1)="1:"
^GBL("AA,"MD","A",1)="0:"
I HAVE USED THIS:
<Data name="ModifyDDDD">
<Delimiter>":"</Delimiter>
<Node>"3,4"</Node>
<Piece>1</Piece>
</Data>
WHILE IT COMPILES IT DISPLAY NOTHING. MY QUESTION IS WHAT IS THE RIGHT SYNTAX AND PUNTUATION FOR THIS, PLEASE?
HOW DO I TYPE IN THE <Node> tag the proper formated data? <Node>"MD","A",1</Node> ??????
Since the class is build on the first 2 nodes, should it be <Node>"A",1</Node>
I tried many different combinations to no avail.
Comments
The data in your sample globals is kind of terse :-)
Can you please clarify what you expect the SQL projection to yield as rows and columns?
Please also see Brendan's excellent series of articles about custom storage mappings: https://community.intersystems.com/post/art-mapping-globals-classes-1-3
my class is build on the global with two nodes. but one of my columns should reference the data in the global entry that has 4 nodes. I want to capture the value from ^OPG("AC","MD",1,3) and get the "1:" using the "Use Specifications: " option shown below without having to create a "Calculated SqlComputeCode" function in the code
But what represents your master map and row level? is that are these 14 entries all corresponding to one and the same row, presumably with some sort of IDKEY consisting of "AC" and "MD"? We cannot say much meaningful without understanding that broader picture.
each entry in the global is unique. i only need to be able to access only one entry. say, ^OPG("AC","MD",1,3). that's it.
Then you'd need to define those four subscript levels as part of your IDKEY and have your data map look like this:
<Data name="ModifyDDDD"> <Delimiter>":"</Delimiter> <Piece>1</Piece> </Data>
Please see the examples attached to the series of articles I referenced earlier