Yes, thank you, the detail is perfect.
In your case, I think you can use this for Loop Coding:
For c=1:1:y.abc.Count() do
And use this for Each Fetch:
Set val=##(utilityclass).GetDesc(c)
Then the utility method returns a single Desc value each time it is
called:
Method GetDesc(I as %Integer) as %String
{
//open the object that has the given ID
//use 0 for 2nd arg of %OpenId to avoid concurrency locking
//also runs faster
Set x = ##Class(B).%OpenId(y.abc.GetAt(i),0)
If $IsObject(x) {
Set desc = x.Description
}Else{
Set desc = “there is no value”
}
Quit desc
}
TIP: Look at the generated INT to see where your M.C.B. settings get
placed. The doc. doesn't show this but I think it's helpful.