Get Data from global node after using $Query
I am using $Query to loop through a global.
When I use $GET to get the data all we get back is the global name.
How do you get the value of the global after you have looped.
Below is my example in terminal.
Thank you in advance
Set node = $Query(^FromExtraMed(""))
w node
^FromExtraMed("A02",9220)
If i try w $GET(node) it returns
^FromExtraMed("A02",9220)
If i had this hardcoded it would have got the value
w $GET(^FromExtraMed("A02",9220))
0,66340,2120
I have already read the documentation and it is not clear. Can someone advise?
Comments
Check the docs, specifically the target argument.
Thanks didn't see that
have changed to the below which works from your answer
Set node = $Query(^FromExtraMed(""),1,nodevalue)
{
write nodevalue,!
}
As Eduard mentioned — use the optional target parameter to get the value .. or use $O
2 mistakes:
#1^$get(node) delivers the content of variable node
but you would expect the result of $get(@node) using node as global reference
#2) the better way is to use the implicit GET
Set node = $Query(^FromExtraMed(""),1,value)
write value
Hi,
You can try:
write $get(@node)
0,66340,2120
Regards, Toni Peña