David Hockenbroch · May 25, 2023 go to post

Marc, I'm not asking about doing all of that from within the Intersystems report server. I'm asking about doing it from, say, an ObjectScript routine within IRIS.

David Hockenbroch · May 25, 2023 go to post

I don't see anything in that list about them.

I'm concerned that we're getting rid of something without really having a suitable replacement just yet.

David Hockenbroch · May 24, 2023 go to post

Is there much of an API for Intersystems Reports? We've used a lot of Zen reports as part of our ERP system where we're feeding parameters to a report and generating it to a stream, or emailing it as an attachment, or saving it to a file.

David Hockenbroch · Mar 21, 2023 go to post

Where I've used that second option to get an IP address, I've noticed that if the client has more than one IP address, it can return different ones different times, and I'm not sure how it determines which one.

David Hockenbroch · Mar 21, 2023 go to post

You can send texts through SMTP if you know the SMS gateway for the service provider. Several of these should be preconfigured on your instance of Cache or IRIS under System Administration, Security, Mobile Phone. You use the phone number @ that server as the email address to send to. For instance, if the phone number was 999-999-9999 and it was on AT&T, you'd send the email to 9999999999@txt.att.net.

So that's one way to do it, but I'm sure there are better ones.

David Hockenbroch · Mar 18, 2023 go to post

The last couple of times I tied this, it told me it couldn't find the jar file to download. I got it from the dev directory on my IRIS server and configured it manually. 

David Hockenbroch · Feb 9, 2023 go to post

Make sure your user account has an appropriate role (like %Developer or %All) and also make sure you aren't using all of your licensing.

David Hockenbroch · Jan 31, 2023 go to post

We're still using a combination of Crystal Reports and ZEN reports, but also looking into Intersystems reports. I don't have much to say yet, other than that I'm also interested in this topic.

David Hockenbroch · Jan 12, 2023 go to post

A parameter is a shared, constant value that's available to all instances of a class. It can be calculated when the class is compiled, but it generally can't be altered at runtime.

A property is a variable that each instance of a class stores it's own value for, and it can be set changed at runtime.

David Hockenbroch · Jan 10, 2023 go to post

Are you sure that's where your problem is? If I do:

select MONTH(dateadd(mm,-1,GETDATE()))

I get 12. If I create a query with a where clause similar to yours on my data, it works as expected.

David Hockenbroch · Jan 3, 2023 go to post

I'm not sure you can do that, but is there any reason you can't define it as two web applications, one with the dispatch class and one without?

David Hockenbroch · Dec 6, 2022 go to post

Where is the function func1? If it's in a routine, you'd use do $$func1^MyRoutine where MyRoutine is whatever the routine is called.

David Hockenbroch · Dec 5, 2022 go to post

If you have a routine that's saved as MyRoutine.mac, that would be:

do $$^MyRoutine

If you have a method within the MyRoutine.mac called Process, it would be:

do $$Process^MyRoutine(myargs)

David Hockenbroch · Nov 18, 2022 go to post

Is that what you want to do, or should you be defining your property as:

Property Status As %String(VALUELIST = ",InProgress,Done,Canceled") [ InitialExpression = "InProgress" ];

This makes InProgress the default status when a new CarDealer.Order is created.

David Hockenbroch · Nov 15, 2022 go to post

The only way I can get it to succeed at a test from the SSL configurations setup screen is if I check SSLv3 under the Protocols in the Crytographic settings, then have it test smtp.gmail.com, port 465.

David Hockenbroch · Nov 15, 2022 go to post

This might be easier to do with XPath rather than a loop.

First, you'll need to create a %XML.XPATH.Document object, maybe using the create from string method:

set sc = ##class(%XML.XPATH.Document).CreateFromString(xmlstring,.mydoc)

Check that the status you get back from that is not an error. If it isn't, you mydoc should be an XPath document. Then you should be able to use the EvaluateExpression method of that document to get what you want, something like:

set sc = mydoc.EvaluateExpression("/Msg/Parties/Party[AgentId=1]/OrgCode","",.value)

If that status is okay, the value you're looking for will be in value, unless there are multiple XML nodes that match that path. W3 provides the XPath syntax specification here.

David Hockenbroch · Nov 9, 2022 go to post

SQL gateway connections provide a way to make an ODBC or JDBC connection to an external data source. It can be another IRIS instance, but doesn't have to be. So whatever you can do with either of those kinds of connections, you can do with the SQL gateways.

David Hockenbroch · Nov 7, 2022 go to post

I've had to do this a time or two in a development environment. Sometimes you can find it under System Operation > Processes and terminate the process. If that doesn't work, you can look at the process ID of the process and kill it at the OS level (the kill command in Linux, or taskkill in Windows). Just be aware that depending on what it's doing and how the task was written, you may end up with some weird stuff.

David Hockenbroch · Oct 14, 2022 go to post

@Nezla in addition to what Danny mentioned here, if you see a part of a URL that starts with a colon in the url map, that part of the url is going to be passed as an argument to the method listed in Call. For example, I'm working on an API for an ERP system, and I've got an endpoint that can be called to get a customer record. The route in the url map is defined as:

<Route Url="/customer/:cust" Method="GET" Call="RequestCust" />
The RequestCust method is defined as:

ClassMethod RequestCust(cust As %String) As %Status

So if a user sends a request to /customer/123456, that gets passed to the RequestCust method with 123456 as the cust argument, and they get customer record 123456. If they send the request to /customer/999999, they get customer record 999999.

David Hockenbroch · Oct 13, 2022 go to post

Normally, one user connecting from one ip address uses one license. However, if you have 25 or more simultaneous connections under one license, it starts considering each connection to be a different license. I believe this is to try to prevent people from cheating the license system.

David Hockenbroch · Oct 10, 2022 go to post

Others have already explained why you can't use those list functions on a list of datatype.

As an alternative approach, though, you could change your persistent class to save the original string that you are using to create the list, then use your $ListFromString etc. on that as you have been.

David Hockenbroch · Oct 7, 2022 go to post

Is oneFldLogin.cls the login page for the application? Go to your management portal, System Administration, Security, Applications, Web Applications, and find the web app. At the bottom, under Custom Pages, is that set as the login page? If you open it in Studio or VS Code, does oneFldLogin.cls extend %CSP.Login?

David Hockenbroch · Sep 29, 2022 go to post

You could create a new class that extends %ZEN.Component.toolbar, and override the ongetdata property to be a certain method name, then define that method in the class. Then you'd have your own custom tag to use in your zen pages. Here's more information on creating custom Zen components.

Inevitably, though, someone is going to come in here and tell you not to use Zen in any new development because it's deprecated, FYI. Which makes me sad, because I still really like working with it.

David Hockenbroch · Sep 29, 2022 go to post

Set tSC=##class(Hosiptal.SDA3.DataTrans).Transform(pRequest)

Is that a typo? Should maybe be "Hospital", not "Hosiptal".

David Hockenbroch · Sep 29, 2022 go to post

In the management portal, go to System Administration, Security, Applications, Web Applications and find your application. Under security settings, disable Unauthenticated, and enable Password.

Then, when you send your requests, you need to include a base 64 encoded basic authentication header with the username and password, or on the end of the URL include ?CacheUserName=username&CachePassword=password. Keep in mind, though, that if you aren't using HTTPS, you could end up transmitting a username and password in plain text or in a very easily decrypted way.

If you want only specific users to be able to access the API, consider creating a new Resource then setting that resource as the Resource Required in the security settings, then only giving that resource to people who need to access the API.