I'm throwing in another vote for streams for all the reasons in the above reply chain, plus two more:

1. More efficient hard drive usage. If you have a ton of tiny files and your hard drive is formatted with a larger allocation unit, you're going to use a lot of space very inefficiently and very quickly.

2. At my previous job, we got hit by ransomware years ago that encrypted every document on our network. (Fortunately, we had a small amount of data and good offline backup process, so we were able to recover fairly quickly!) We were also using a document management solution that ran on Cache and stored the files as Stream objects, and they were left untouched. I'm obviously not going to say streams and ransomewareproof, but that extra layer of security can't hurt!

If that's what you want to do, you may want to consider using an array, not a list. By default, arrays are projected as a child table for SQL. You can find more details on the differences in the Working with Collections article, and the part I'm referring to specifically is the Default Projection of Array Properties section.

You could also change the storage default parameter of your list to  "array", which is also described in the above article.

I think you're looking for the %ArrayOfObjects class for this one. You'd create your objects with all of their value, ID, and type properties, then you'd create the array:

set array = ##class(%ArrayOfObjects).%New()

Then you set values of the array using the SetAt method:

do array.SetAt(downobject,"down")

Then to access a particular value, you use the GetAt method, then dot syntax to access the object's properties:

set myid = array.GetAt("down").id

Here's the %ArrayOfObjects class documentation.

Try replacing your while loop with this:

//set RET to a blank string to start to avoid issues with the first concatenation inside the loop
s RET = ""
while res.Next()
    {
     //Append a ~ and the value to RET
     s RET = RET_"~"_ res.GetData(2)
}
//The way we did this, RET will now start with a ~, which we'll want to remove
//This will look at RET, replace tildes with nothing, starting at the beginning, and only making one replacement
$REPLACE(RET,"~","",1,1)

//having done that, RET should now be, "description 1~description 2"

If it's a problem communicating with the broker applet, this could be a problem with your configuration or with your programming. To help figure out which it is, go to http://(your server):(your port)/samples/zipcode.csp and try to use that page. Just put 90210 in the zip code box and press tab. It should say that's the city Beverly Hills in the state of CA. If you get an error doing that, it's a configuration problem.

If it's a programming problem. Are using any #server calls when the page is loading, like in an OnLoad event or using embedded javascript in a runat="server" block? If so, you'll need to change those to use ObjectScript in a runat="server" code block.

If you want to be able to call that method without first creating an instance of your class, you need to define the method as a Class Method, not just a Method. Add "Class" before Method on that function definition and recompile your class, and it will probably work.

Otherwise, like Marc said, you'll have to instantiate the class then call the method on that instance.

I think you can accomplish this is $LISTFIND. It searches a list for a value, and returns its position in the list. If the item isn't found in the list, it will return a 0. For example, if you've got a list of colors called colorlist you'd use "where $LISTFIND(colorlist,'blue') > 0" in your SQL predicate to only include rows that have "blue" in their list. If the list contained "red", "blue", and "green" in that order, the $LISTFIND would return a 2. If the list contained "orange", "yellow", "taupe", the $LISTFIND would return a 0 because "blue" wasn't found and that row would be excluded.

Neither of the previous replies did exactly what I wanted to do, but action set to "New Window", filled the URL box with the URL but putting $$$VALUELIST where I needed that value to be, and set the "Active When" drop down to "1 Listing Item Selected". I set the Type to "Button" and gave it a label.

Now when you view listings in this dashboard and select one, you can click that button at the top to navigate where you need to go. That works for my purposes!