Question
· Sep 10, 2019
%OpenId Query

I am new to cache programming language . I am facing below issue . please assist.

Question: One persistent class ID column is a combination of its properties (Roll No and Marks) [ Exact: RollNo||Marks]. When i am running the query from Management portal it is displaying data in the same format and data is there. But in the code if i am making below statement, i am getting null value.

Set ExistsID=##Class(User.School).%ExistsId(RollNo_"||"_Marks)

set ID=##Class(User.School).%OpenId(RollNo_"||"_Marks)

0 8
0 1.1K

Hi all, it's finally time for the next release of VSCode ObjectScript extension. So what's new in this release.

  • Debugging support, for classes, routines and attach to a running process
  • Files in Server Explorer now can be edited

  • Added more details about connection errors

  • Improvements in Server Explorer build tree

  • Fixed memory leak when exporting large amount of files
  • Server view can be opened in explorer as virtual file system with schema `isfs://`
  • Option to suppress popup information message about successful compile, ("objectscript.suppressCompileMessages": true)
  • Export, addCategory setting have more flexibility in naming category for exported items
  • Formatting for commands and functions, as Word, UPPER or lower
  • Some improvements in syntax highlighting
  • Some other small fixes

10 16
3 1.5K

Hello,

I had an issue when using the method Exists, I noticed that if you provide a directory for this method it returns 1.
This is really misleading, because sometimes the input could be a directory and the only way to predict this is to also test if the file is a directory.

I didn't tested using the Attributes method, but I supposed that this means could also be a solution for that issue.
But still, I expected the Exists method to return 1 for files and 0 for directories, since there's also method called DirectoryExists already.

0 4
0 409

OAuth server to be deployed on the IRIS learning cloud platform. Clients - one on the other instance of the learning IRIS server, the other client locally on my computer in the container docker.

Both clients get a seemingly correct link (through ##class(%SYS.OAuth2.Authorization).GetAuthorizationCodeEndpoint()) to the login request form:

1 3
1 754

Hi Developers!

Often we need to use relatively small arrays with constants, static arrays in algorithms, etc where we need to do something with each element of an array. There are several ways to deal with it in ObjectSctipt.

Previously I used to use globals, locals, PPG for this but not so long time ago figured out that %List is a way too handy.

Indeed, suppose we have an array of months and need to set up and use it in our code.

2 15
1 565

Hi Developers!

Often when we develop some library, tool, package, whatever on InterSystems ObjectScript we have a question, how we deploy this package on the target machine?

Also, we often expect that some other libraries already installed, so our package depends on them, and often on some particular version of it.

When you code on javascript, python, etc the role of packages deployment with dependency management takes package manager.

So, I'm pleased to announce that InterSystems ObjectScript Package Manager available!

13 19
4 2.8K

Hi Developers!

A question to those who use VSCode to code InterSystems ObjectScript.

Suppose you have the ObjectScript code on IRIS server and you want to export it into the desired folder.

And you have VSCode connected to the server.

What is the way to tell VSCode that I want to export classes into some particular folder in /package/class.cls way?

E.g. into:

/project_folder/src/cls/Package/class.cls

and project_folder is opened in VSCode as the folder of the project.

1 8
0 864

The .NET Core Identity model has an IPasswordHasher<> interface for for

  • Hashing a password so that it can be stored in a database
  • Verifying a provided plain-text password matches a previously stored hash.

I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors.

0 6
1 2.2K
Article
· Aug 21, 2019 2m read
ToolBox-4-Iris

Hello everyone,
After some work with IRIS we want to share our ToolBox-4-Iris with you.

What is this about?

The ToolBox-4-Iris is an API for IRIS with a collection of handy and useful tools - features that are not available in IRIS, but greatly simplify application development. To save time and effort on the "typical tools" that every developer needs. This includes additional classes, individual methods or even more efficient macros, which are described in the respective packages.

Content

11 3
1 378
Question
· Aug 15, 2019
List property

I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please.

0 3
0 454

Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good wink ).

6 1
2 447

I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.

2 3
0 2.3K

Hello,

I am wondering the best way to disable a user account using this class in Cache (Security.Users).

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

Example User Account = jhipp

Currently is Enabled

I know that we can use the auto-generated EnabledGetStored method, for example:

%SYS> w ##class(Security.Users).EnabledGetStored("jhipp")
1

0 4
0 369

Hi Everyone!

Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in the "Coding Talks" format:

Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare

https://www.youtube.com/embed/fhwiSy54lyY
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 396

Hi,

I have a method that has multiple parameters and is normally used from other classes in ObjectScript. Most of the parameters have default values. Withing the server code that's perfect. In some areas I can call myMethod(,,"sometext") or myMethod(tVariab) and thats fine... I use it as it's required in each place.

But now I want to expose it as a REST service so I need to buld a kind of wrapper., another method in a REST dispatcher class that will receive the parameters in a JSON object and will call the server method already implemented. Something like:

0 3
0 722

Pre-requisite - Basic knowledge of ENSEMBLE and ObjectScript

My both previous sessions were related to OBJECTSCRIPT.
This time, we are going to add a flavour Ensemble/Healthshare,
to be informative and fast.

In this session we are going to discuss about -
"Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare"

Web API can be REST or SOAP. We will taking example of SOAP in this session.
However, whatever I demonstrate today, will also be applicable for REST.

0 0
0 322
Article
· Aug 1, 2019 3m read
Nested set model for ObjectScript

In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:

6 1
1 870

Hello Community,

How do i disable an operation explicitly based on a value in a variable?

I set the ReplyCodeAction to E=D.

In the Operation Code i am throwing an explicit ERROR

THROW ##class(%Exception.General).%New("Shutting Down Operation",999,,"My own special exception")

But my operation still remains up.

Any suggestions please will be appreciated.

0 6
0 278