Does anyone know how to set an email as High priority when it is sent using a %Net.MailMessage object? Somehow I can't seem to put my finger on it.
Thanks!
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Does anyone know how to set an email as High priority when it is sent using a %Net.MailMessage object? Somehow I can't seem to put my finger on it.
Thanks!
Hi,
I'm processing POP3 emails using the standard EnsLib.EMail.InboundAdapter adapter and %Net.MailMessage. I'm basically processing documents that are attached to received emails. This works fine if the document is simply attached to the email itself. But some systems are sending documents that are attached to an attached email which has content-type = message/rfc822.
How do I get the attached file from the attached email?
I'm using the following code to iterate through the email parts.
Hello Everyone
I am new to cache. I know there are 2 types of methods in cache. One is Instance method (Which can be call through object creation of particular class) and other is Class methods (which can be call through ##Class(MyPackage.Car).CarModels()).
I want to know the difference when to create a instance method vs when to create a class methods.
Thanks in advance!!.
In Java we can use reflection to get the method arguments in an array, we can also get the name of argument.
Do we have similar features in ObjectScript?
Thanks!
Our client is a UK-based company with subsidiary operations in the USA, France, Germany and China. The Company supplies materials which are used for research, development, and specialised manufacturing applications worldwide. The Business Intelligence department is a small but integral part of the company. The department provides support to the wider business through information systems. We are currently seeking a Business Intelligence Caché Specialist that will be responsible for supporting and developing the existing Caché system, which is used widely within the business.
Hi Community,
Enjoy watching the new video on InterSystems Developers YouTube:
⏯ Visual Studio Code for ObjectScript: Server-Side Source Control
After linking in Oracle Table with Field Column's Data Types of NUMBER, my updates into these table fields are resulting in data that is being rounded to 2 decimal places. I insert a record with 1234.1234 and 1234.12 is stored.
It appears Cache xDBC might be manipulating my values prior to sending to Oracle. Is there a setting or system parameter that is controlling this? If so, is there a way to relax this from occurring so the values I send are being stored in Oracle with the same values?
Hey Developers,
New video is already on InterSystems Developers YouTube:
⏯ Visual Studio Code for ObjectScript: Choosing an IDE/Source Code Combination
Hey everyone as you may know I am a beginner and I am kindly asking for some assistance in a problem I have been solving. The problem is that I am calling a user defined function within a procedure called occupiedseatsAdj and the compiler comes up with this error.
| <NOLINE> | There has been an attempt to refer to a nonexistent routine line. |
From what I understand I can call a user defined function from within a procedure (correct me if I am wrong) as shown below. Is this the correct way or should I create a .Mac file and include it somewhere within the above mentioned cls file ?
Hi developers,
We have just published an update to the Deltanji version control extension for Visual Studio Code.
When used in certain Deltanji workflows, triggering an automatic checkout on first keystroke could result in the developer working on an outdated copy of the code and only being notified of this later when saving their changes. In order to prevent this from happening checkout now reloads the document immediately.
Error messaging has been improved in two areas - when attempting to cancel code that is not checked out, and when trying to register new code onto a withdraw system.
We have also improved interoperability between the Deltanji extension and the InterSystems ObjectScript one, as well as its handling of multi-component objects.
If you're already a user of Deltanji then your extension with automatically update. You can find out more information on Deltanji and the latest release here.
Hi All I am a beginner and I am learning Objectscript and I would appreciate a steer regarding a problem I am solving.
The issue I have spent some time on resolving without success is that I have the stream listed below and as you can see it has some gaps in it.
Stream
das
is
wp
dsa
nmkHere is the import method
IF ##class(%File).Exists(dir) '=1 {
write !, "Unable to Open: "_dir
QUIT
} ELSE {
write "File: "_dir_" is open"
}
// instantiate a new class called file
set file = ##class(%Stream.FileCharacter).%New()
// create a new variable called sc
set sc = file.Hi folks!
Is there a way (function) to know the name of the database for data of the current namespace?
I take the case where we have one database for data and another database for code in a namespace.
Thanks!
I have been working within Objectscript for a few months and I am seeking assistance today because all of the help files within the docs.intersystems.com domain are currently down and they wont be back up until next week. (I raised a special ticket for this)
I have been trying to figure out how to convert a binary number 0101001 in to a decimal number using a variable called CNumber and I have tried using the method below and it hasnt worked. I think it may be due to the fact that this assumes an array or some sort.
Hi,
I am getting following error while compiling a routine :
Compiling routine : demoroutine.mac
ERROR: demoroutine.int(1) #1026: Invalid command : 'write "Use one of the following options"' : Offset:6 [write^demoroutine]
TEXT: write "Use one of the following options"
Detected 1 errors during compilation in 0.022s.
Please note that Routine contains just a below simple write command :
write "Use one of the following options"
Thanks
Hi folks!
Want to share a lifehack with you on ObjectScript highlighiting withing VSCode for script files.
Script files are just files with lines of ObjectScript that we feed anywhere, e.g. into IRIS during Docker baking procedure.
Typical usecase - here is the Scriptfile
here is the Dockerfile where we feed it.
And here is how it looks like usually in VSCode:

Coudl be more beautiful, right?
Hi community,
This is another article about how to perform actions that you can do in the web portal but via code.
Today.... Add a business item in your production by code
Hi,
How to check if data string contains Unicode characters?
Thanks
Hi community,
I'm going to publish several articles on how to perform actions that you can do in the web portal but via code.
Today.... Web Applications via code
I have a routine tag that takes an argument and I want this argument to be an array reference. So I try something like:
do mytag(.myarr)
The mytag tag, adds subscripts to myarr.
When I evaluate myarr after the tag call, only the subscripts passed in are retained in myarr. The subscripts added by mytag are missing. Is there a way to pass an array so it will behave the way I want it to?
Hi all,
Are there limitations to the size of a file or stream that %XML.Reader will parse?
I am trying to parse a large, 573MB, XML file using either the 'OpenFile' or 'OpenStream' methods, but both return errors.
When I try to use the 'OpenStream' method I get a 'ERROR #6301: SAX XML Parser Error: input ended before all started tags were ended' error',
and when I try the 'OpenFile' method I get a 'ERROR #6301: SAX XML Parser Error: <STORE>'.
'%XML.TextReader' appears to parse the file OK, so I may be able to get use that as a workaround, but ideally I would like to get '%XML.Reader' working.
Hi,
When for any particular reason I need to update a record and don't want to pull the triggers, the keyword %NOTRIGGER can be used. But I've been trying to do the same when I change the row using the object approach, but I can't find it. Anyone knows if it's possible to avoid pulling triggers when working with objects?
Sadly, the utility "DISABLE^%NOTRIGGER" doesn't seem to exist ;-)
Thank you,
David
Hi,
What is the difference of class normal and date/time property and how to use in the script and what is the use of MINVAL and MAXVAL parameters?
Thanks
Hi!
Does anyone have a cleaner approach than this for looping through grouped NTE segments in order to set the segment ID in an ORM? I am aiming to avoid the NTE segments that may follow the PID segment and find the NTE's that follow the OBR segment. By using the below If statement in the While loop, I'm finding NTE's that have comments in the fourth field (PID NTE's tend not to have these in the messaging I'm seeing, I'm awaiting confirmation on this), as well as finding my newly inserted NTE segment using $FIND to locate the colon (I've concatenated some values).
the start date must always
be the first day of the effective salary month.
Good afternoon I am making a method of a class that I want to return a list of objects of another class that I have defined, example:
ClassMethod myMethod() As list of MyPackage.MyClass
{
}
But it gives me a syntax error, I try this and it works:
ClassMethod myMethod() As %ListOfObjects
{
}
But I would like to keep the typing.
Is there a way?
How do you initialise a list of objects of a particular type?
I have tried the following code and I get an undefined when I try to insert.
.png)
I can do this and it works but I don't know if it is correct.
.png)
Is there any way to do something like this?
Set a= New list of Accciones()
Thank you.
Hello All
I'm running into an issue performing UPDATES that I'm not getting on INSERTS. It's probably obvious, but I'm just not seeing it and could use a little help.
I'm going over an HL7 message and depending upon varying criteria, the relevent variables will get items added to them like the following:
Set patientId = pRequest.GetValueAt("PID:3")
Set sqlColumns = sqlColumns_",patient_id"
Set sqlValues = sqlValues_",?"
Set par($i(p)) = patientIdAfter compiling the variables, I check to see if accession number is found in the table.
set performInsert = 1
set performUpdate = 0
.Hi Community,
We're pleased to invite you to the upcoming webinar in Spanish called "ObjectScript - Persistence and Integration"!
Date & Time: July 19, 4:00 PM (CEST)
Speaker: @David Reche, Manager of the Dev Community in Spanish
Hi Community,
This post is to introduce one of my first project in COS, I created when started to learn the language and until today I'm keeping improve it.
The CosFaker(here on Github) is a pure COS library for generating fake data.
cosFaker vs Populate Utils
So why use cosFaker if caché has the populate data utility?
Ok the populate utility has great things, like the SSN Generator for example, but what to do when you have a field with a long description of a product? How to check if that table will list the emails or if that calculated property will count the days of the last user interaction.
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.
I found a similar post where the example was using a BPL, however there's some additional trickery processing that I already have working within an ObjectScript Business Process and would like to avoid trying to recreate in a BPL.
Any sample code will be greatly received ![]()