go to post David Hockenbroch · Oct 7, 2021 At the bottom of the pane you showed in your screenshot, there should be a few tabs. If you're on the "Project" tab and haven't added any classes to your project, it would look like that. If you switch it to the "Namespace" tab, you should see everything.
go to post David Hockenbroch · Sep 24, 2021 MAXSTRING usually indicates that you're exceeding the maximum possible length of a string somewhere. Are you sure it's a problem with the %Stream.GlobalCharacter, and not a different string variable in your program? Global character streams shouldn't have that problem. You can see what the maximum length of a string is on your system by opening a terminal and running: write $SYSTEM.SYS.MaxLocalLength()
go to post David Hockenbroch · Sep 24, 2021 One of the properties of the %SOAP.WebClient class is HttpRequest which is an instance of %Net.HttpRequest. You might need to set the content type of that HttpRequest. So where you have "..ContentType", try "..HttpRequest.ContentType"?
go to post David Hockenbroch · Aug 19, 2021 The maximum URI size in Apache is usually 8,177 characters, but increasing that isn't the problem. Somewhere in your program, the value of your input is getting appended onto the URI, and it shouldn't be. Can you see anywhere that your program might be doing that?
go to post David Hockenbroch · Jul 27, 2021 I've had some time to try this now. Here are steps that worked for me: set myrequest = ##class(%Net.HttpRequest).%New() set myrequest.Server = "<server ip or domain here>" set myrequest.Port = "<server port here if it isn't 80>" set myrequest.Location = "</path/to/rest>" do myrequest.EntityBody.Write("<your json here>") do myrequest.Post() set mydata = myrequest.HttpResponse.Data.Read() At that point, the data returned in the response should be in mydata. Depending on your specific API, you made need to take additional steps for authentication, and you may need to use myrequest.Get() or myrequest.Put() instead of myrequest.Post(). If you need to set parameters, you use the SetParam method of the HttpRequest. For example, if you're using the very most basic way to authenticate to a Cache instance, you do that by specifying a CacheUserName and a CachePassword as parameters as follows any time before your post/put/get: do myrequest.SetParam("CacheUserName","<your username here>") do myrequest.SetParam("CachePassword","<your password here>")
go to post David Hockenbroch · Jul 21, 2021 If your other system is also a Cache or IRIS server, there is a mirroring options called a reporting async that exists for this specific purpose. If you've got multiple servers and need to consolidate that data for reporting purposes, a reporting async can be a part of up to 10 mirrors to help you bring that data together, too.
go to post David Hockenbroch · Jul 19, 2021 Somewhere in your button tag, you have onselect= something. Buttons don't have an onselect, but even if they did, I'm guessing that's not the event you actually want. onselect happens when a user highlights text within a control, like in a text input. If you're trying to set what happens when the user clicks the button, that's onclick. If you're trying to set what happens when the user selects the button but doesn't click it (say by pressing tab until the button is highlighted) that's onfocus.
go to post David Hockenbroch · Jun 28, 2021 The %OnAfterCreatePage() method takes place after an instance of your page has been created on the server, but before it gets sent to the client, so it's really intended for server-side stuff. Maybe instead you should be using the onloadHandler() method. That one runs on the client just before the page is displayed.
go to post David Hockenbroch · May 20, 2021 EnsLib.File.PassthroughOperation that lets you use timestamp variables, not EnsLib.File.PassthroughService. PassthroughOperation sends files, PassthroughService receives them.
go to post David Hockenbroch · Apr 30, 2021 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.
go to post David Hockenbroch · Apr 30, 2021 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"
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 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 · 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!