go to post David Hockenbroch · Apr 28, 2021 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.
go to post David Hockenbroch · Apr 21, 2021 It's hard to answer your question without more details about your class definition, but in general, you'd create an instance of your class, then just use the typical dot-separated syntax. So if your instance was called "MyTask" you should be able to use MyTask.Patient.FirstName to refer to the FirstName property of your patient.
go to post David Hockenbroch · Apr 16, 2021 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.
go to post David Hockenbroch · Mar 29, 2021 Glad to hear that, Sebastian! Would you mind marking my response as the correct answer, then?
go to post David Hockenbroch · Mar 26, 2021 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.
go to post David Hockenbroch · Mar 11, 2021 I'd do an if before you create the result set. if doUnion{ set myquery = "query 2" } else{ set myquery = "query 1" } set rs = ##class(%ResultSet).%New(myquery)
go to post David Hockenbroch · Feb 22, 2021 Neither of the previous replies did exactly what I wanted to do, but José's link did get me looking in a direction where I found a solution. I changed my listing so that the value I needed in the URL was the first column in the listing, then able to add a control to my widget with the 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!