go to post Jodrick Sieyanji · Oct 1, 2021 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
go to post Jodrick Sieyanji · Oct 1, 2021 I also tried this method and I didn't have the desired respond. do loopquitnew idxset idx = 1 write !,$order(^Data(idx),+1) quitloop new idx set idx = "" for { set idx = $o(^Data(idx)) quit:idx="" write !,"idx: "_idx write ^Data(idx, "name")} quit new idxset idx = $$getNext()set ^Data(idx, "name") = "Jodrick"set ^Data(idx, "surname") = "Sieyanji"quitwrite ^test(1),!write ^test(2),!quit getNext() {return $order(^Data(""),-1) + 1}
go to post Jodrick Sieyanji · Sep 30, 2021 i don't how i will write the code for me to read a name or a birthday from its index? kind of if i have search someone from its name and have all his information displayed