Andrey is an Avid Reader. No contributions for 2024.
Without a doubt, there will be something to
share on the Community in 2025!
User bio
404 bio not found
Member since Jun 23, 2022
Posts:
Andrey has not published any posts yet.
Replies:

Yup, that's simpler way to do it instead of $Q. It's same as this: s sub="" F  s sub=$O(^je1("NotConfigured",sub)) Q:=sub=""  w sub,!  just without redirection. The main key here if you are looking for just sub script level then $O is what you need. If you want whole global ref, then aka instead of getting just CBB or CH11 you would get ^je1("NotConfigured","CBB"). In your case this would exit the loop since your loop is looking at $Q(@node) where node = ^je1("NotConfigured","CBB") instead of ^je1("NotConfigured") and since there is no sub script at that level your loop quits (hence only why you get the first level from your initial Set command). So your code should look like this for $Q to work:

Set node = "^je1(""NotConfigured"")"
   WRITE !,node
  FOR   {
    SET node=$QUERY(@node)
        QUIT:node=""  
        WRITE !, node
  }

$Q is useful when you want to check what level exist under a global which may be defined dynamically or something close to that, but $O does the job for everything else. 

Certifications & Credly badges:
Andrey has no Certifications & Credly badges yet.
Global Masters badges:
Andrey has no Global Masters badges yet.
Followers:
Following:
Andrey has not followed anybody yet.