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!