User bio
404 bio not found
Member since Sep 29, 2021
Replies:
set searchName="Xiang"

set id=""  
for {
    set id=$ORDER(^Data(id))  
    quit:id=""
    if ^Data(id,"name")=searchName {
        write ^Data(id,"surname"),":",^Data(id,"name"),":",^Data(id,"birthday"),!
    }
}

Am not very sure where my error is, but when i execute this bit of the code nothing happens.

that is when i try to do a search by  iterate through all entries with the name of Xiang

I also tried this method and I didn't have the desired respond. 


do loop
quit
new idx
set idx = 1
  write !,$order(^Data(idx),+1)
   quit
loop
  new idx set idx = ""
  for {
  set idx = $o(^Data(idx)) quit:idx=""
  write !,"idx: "_idx
  write ^Data(idx, "name")
}   
quit 
   
new idx
set idx = $$getNext()
set ^Data(idx, "name") = "Jodrick"
set ^Data(idx, "surname") = "Sieyanji"
quit
write ^test(1),!
write ^test(2),!
quit

getNext() {
return $order(^Data(""),-1) + 1
}
 

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