0

I am tasked with getting the list of all the NODES in Global Data, specifically, all data that looks like ^BACKTR("INDX","COMPANY",,,) :

1:  ^BACKTR("INDX","COMPANY",1,63543,5870)  =   ""
2:  ^BACKTR("INDX","COMPANY",1,63572,9792)  =   ""
3:  ^BACKTR("INDX","COMPANY",1,63573,9904)  =   ""
4:  ^BACKTR("INDX","COMPANY",1,63650,20950) =   ""
5:  ^BACKTR("INDX","COMPANY",1,63651,21058) =   ""

I only need the nodes, not the values itself. Is there a way to get this list programatically? I have tried exporting the whole xml of the globals via this code in VB.net with the VisM control :

AxVisM1.Code = "do $system.OBJ.Export(""BACKTR.GBL"",""C:\Users\Support\Desktop\global.xml"")"

however, this creates a xml file that includes all the nodes under BACKTR. I only need nodes that are like ^BACKTR("INDX", "COMPANY",,,)

Is there an objectscript syntax I can use to output that list? Or should I resort to using XML? I just need the object script syntax for it, as I can execute code in VisM anyway

Malcolm Salvador
  • 1,476
  • 2
  • 21
  • 40

2 Answers2

1

Unfortunately it is not possible to export just any part of data in a global, like you want. You can just merge, any data to any empty global, and export it.

DAiMor
  • 3,185
  • 16
  • 24
1

Can you run two object script codes? (copy to a temp global then export)

merge ^BACKTRTMP=^BACKTR("INDX","COMPANY")
do $system.OBJ.Export("BACKTRTMP.GBL","C:\Users\Support\Desktop\global.xml")

you can then dispose of the temp global later

kill ^BACKTRTMP
Mike M
  • 21
  • 2