ObjectScript

Syndicate content 34 

Hello, InterSystems community!

Lately, you have probably heard of the new InterSystems Package Manager  - ZPM. If you're familiar with it or with such package managers as NPM, Dep, pip/PyPI, etc. or just know what is it all about -- this question is for you! The question I want to arise is actually a system design question, or, in other words, "how should ZPM implement it".

Last answer 5 hours 39 min ago Last comment 1 hour 18 min ago
+ 2   0 3
54

views

+ 2

rating

Hi,

     I have written a procedure with the help of object scripting to export data to a csv file. There is more data than  the csv limit.

Can anyone please tell me how to get the row count of csv file using object scripting, so that I can write an if condition and write to a second csv file.

Please find the code writing to the csv given below.

Last answer 1 days ago Last comment 23 hours 28 min ago
0   0 3
66

views

0

rating

ObjectScript has at least three ways of handling errors (status codes, exceptions, SQLCODE, etc.). Most of the system code uses statuses but exceptions are easier to handle for a number of reasons. Working with legacy code you spend some time translating between the different techniques. I use these snippets a lot for reference. Hopefully they're useful to others as well.

 

Last comment 2 days ago
+ 13   14 6
651

views

+ 13

rating

Good day,

We upload images into the database with this code :

<tr>
<td align="right">FileName</td>
<td><input type=file size=200 name=FileStream></td>
</tr>

s FullFilename = %request.Get("FileName")
s FileName = ##class(%File).GetFilename(FullFilename)
s ItemImage.FileName = FileName

+ 1   0 3
0

comments

92

views

+ 1

rating

I'm pleased to announce the latest version of the renewed for ObjectScript, which is now available with a lot of new features.

This new extension is a fork of previously developed extension in different repository originally started by @Oleg Dmitrovich.

Last comment 10 days ago
+ 26   10 5
1599

views

+ 26

rating

When using $SYSTEM.Status.DecomposeStatus(tSC, .tErrorList) in ObjectScript to get the lsit of errors (I need to do this so that I can generate a custom JSON with the error messages) what is the type of tErrorList returned and how to intialize?

Last answer 10 days ago
0   0 3
0

comments

42

views

0

rating

Hello,
 
I'm looking for a simple commons method or operator that allows me to repeat some characters  n times. I know I could write this using a for loop, but I wish to avoid for loops whenever necessary and a simple direct method should exist somewhere.
 
Best Regards.
Last answer 27 November 2019 Last comment 28 November 2019
0   0 2
120

views

0

rating

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

Last comment 26 November 2019
+ 7   2 2
479

views

+ 7

rating

I have SQLCompute with SQLComputeCode on a couple of Properties in my class.

These work fin when I insert/update via ObjectScript or SQL from the ManagementPortal.

However, if I insert (create new record) via my C# app using the Caché ODBC DLL the SQLCompute is ignored, it does not run.

Is this expected InterSystems Caché behaviour? We are on latest IRIS platform.

Last answer 13 November 2019 Last comment 26 November 2019
0   0 2
90

views

0

rating

I'm pleased to announce the latest version of extensions for ObjectScript. Just a month has gone since my latest update, and I already have something new to show.

Important. In this version connection to the server will be disabled by default. You have to activate connection through the settings:"objectscript.conn.active" = true.

Last comment 26 November 2019
+ 5   1 5
621

views

+ 5

rating

Hi all.

I'm currently working with a system needing results from a lab system, and they can only accept a single OBR per R01 message.

The R01s from the source have multiple OBRs, so I need to be able to send a message per OBR.

Last answer 24 November 2019 Last comment 21 November 2019
+ 1   1 2
109

views

+ 1

rating

Class Queries in InterSystems IRIS (and Cache, Ensemble, HealthShare) is a useful tool that separates SQL queries from Object Script code. Basically, it works like this: suppose that you want to use the same SQL query with different arguments in several different places.In this case you can avoid code duplication by declaring the query body as a class query and then calling this query by name. This approach is also convenient for custom queries, in which the task of obtaining the next row is defined by a developer. Sounds interesting? Then read on!

Last comment 22 November 2019
+ 15   1 11
4293

views

+ 15

rating

I face the challenge to have a bunch of classes on IRIS and CACHÉ in parallel
until all systems are migrated to IRIS.

Applying changes in Caché development environment and moving  to IRIS is no problem

But if I have to apply a fix on IRIS there seems to be no clean way back to Caché. 

Last answer 19 November 2019 Last comment 19 November 2019
+ 5   2 2
130

views

+ 5

rating

Hi

I've got a string variable which I need to convert into a XML one.

My main goal here is to use the XML bit I've extracted from a HTML file in a message I need to pass over to an operation.

I'm doing the following which always errors

classMethod WriteNodes(myfile As %String)
{
    Set status=##class(%XML.TextReader).ParseString(myfile,.reader)

....

Any easy way of making this happen?

Kind regards

Last answer 22 February 2019 Last comment 21 November 2019
0   1 3
316

views

0

rating

Hello Everyone,

I'm want to know, what is more common for your company to use, the abbreviation syntax or the complety name of commands, and why?

Ex. 

S VAR=10 / D FUNC^ROUTINE F 1:1:1000

Set VAR=10 / Do Func^Routine / For 1:1:1000

set var=10 / do func^routine / for 1:1:1000

Here in my company, we are familiar with the abbreviation syntax, because to spell is more faster.

Last answer 29 October 2019 Last comment 20 November 2019
+ 2   0 11
455

views

+ 2

rating

Hi, I asked last week and they gave me some little tips. But the truth is I still can't carry out this "Project".
 

I must perform a REST service, using Oracle 11 database. Eh tried anyway to achieve this.

The purpose is to make a REST service, using the database provided to me and use the procedure that is already created.

 

According to what I read, I made the connection via JDBC and I had no major problem

Last comment 19 November 2019
0   0 3
0

answers

68

views

0

rating

Hi Developers!

Often I find questions on how to install IRIS, connect to IRIS from IDE, setup the environment, compile, debug, maintain the repository.

Here below possibly the shortest way to set up all the environment and start development with ObjectScript on InterSystems IRIS.

Prerequisites

Make sure you have Git, Docker, and VSCode installed

Install Docker and ObjectScript extensions into VSCode

Sign in or Create an account on Github

Here we go!

Last comment 17 November 2019
+ 5   5 2
406

views

+ 5

rating

Hi everyone,

I've encountered this annoying issue so many times before, if any one also encounter this issue, please share here if you have any solution.

So, I've been working on a web service project using HealthShare 2015. Sometimes I have to set a debug target to a csp file to debug it. If I pause the debug process about 3 minutes above or so (to examine an object, variable, etc..) the studio will hang.

Last answer 15 November 2019
0   0 3
0

comments

52

views

0

rating

An exciting position has arisen for an Application Support Analyst 3rd Line, in an established support team. The role will suit candidates looking to work in the software industry who want to provide good customer service, enjoy finding solutions for problems and are enthusiastic about software and technology.  http://codas.com

+ 2   0 1
0

comments

83

views

+ 2

rating

An exciting position has arisen for a Junior Application Support Analyst in an established support team. The role will suit candidates looking to enter, or are at the start of their career in, the software industry who want to provide good customer service, enjoy finding solutions for problems and are enthusiastic about software and technology. http://codas.com

+ 2   0 1
0

comments

64

views

+ 2

rating

In the previous article, I have demonstrated a simple way to record data changes. At this time I have changed the "Audit Abstract Class" which is responsible for recording audit data and the data structure where the audit log will be recorded.

I have changed the data structure to a parent and child structure where there will be two tables to record the "transaction" and the "fields its values" changed on that transaction.

Take a look at the new data model:

Last comment 13 November 2019
+ 6   1 8
401

views

+ 6

rating

I have a custom written date, setup as myDate in my application, which always behaved fine for years, and now it's acting a little weird. 

When I run SQL in Display mode the date shows as 1/10/1841 for some but not ALL rows.

When I run the same exact query in logical Mode the date shows normal format, in my case, for example 10/1/2019.  When the application is running is shows the incorrect date.  When I run the terminal session and open a ref point and ask to write a date is shows 10/1/2019, but I am expecting internal format here - 65287.   

Last answer 5 November 2019 Last comment 6 November 2019
0   0 2
78

views

0

rating