Search

Clear filter
Article
Nikolay Solovyev · Jul 29

Dynamic Templated Emails in InterSystems IRIS with templated_email

Sending emails is a common requirement in integration scenarios — whether for client reminders, automatic reports, or transaction confirmations. Static messages quickly become hard to maintain and personalize. This is where the templated_email module comes in, combining InterSystems IRIS Interoperability with the power of Jinja2 templates. Why Jinja2 for Emails Jinja2 is a popular templating engine from the Python ecosystem that enables fully dynamic content generation. It supports: Variables — inject dynamic data from integration messages or external sources Conditions (if/else) — change the content based on runtime data Loops (for) — generate tables, lists of items, or repeatable sections Filters and macros — format dates, numbers, and reuse template blocks Example of a simple email body template: Hello {{ user.name }}! {% if orders %} You have {{ orders|length }} new orders: {% for o in orders %} - Order #{{ o.id }}: {{ o.amount }} USD {% endfor %} {% else %} You have no new orders today. {% endif %} With this approach, your email content becomes dynamic, reusable, and easier to maintain. Email Styling and Rendering Considerations Different email clients (Gmail, Outlook, Apple Mail, and others) may render the same HTML in slightly different ways. To achieve a consistent appearance across platforms, it is recommended to: Use inline CSS instead of relying on external stylesheets Prefer table‑based layouts for the overall structure, as modern CSS features such as flexbox or grid may not be fully supported Avoid script and complex CSS rules, as many email clients block or ignore them Test emails in multiple clients and on mobile devices Capabilities of the templated_email Module The templated_email module is designed to simplify creating and sending dynamic, professional emails in InterSystems IRIS. Its key capabilities include: render Jinja2 templates to generate dynamic email content Flexible usage — can be used both from Interoperability productions and directly from ObjectScript code Built‑in Business Operation — ready‑to‑use operation for production scenarios with SMTP integration Automatic inline styling — converts CSS styles into inline attributes for better email client compatibility Markdown support — allows creating clean, maintainable templates that are rendered to HTML before sending These features make it easy to produce dynamic, well‑formatted emails that display consistently across clients. Module templated_email The module provides the following key components: TemplatedEmail.BusinessOperation — a Business Operation to send templated emails via SMTP TemplatedEmail.EmailRequest — an Interoperability Message for triggering email sends, with fields for templates, data, and recipients TemplatedEmail.MailMessage — an extension of %Net.MailMessage that adds: applyBodyTemplate() — renders and sets the email body using a Jinja2 + Markdown template applySubjectTemplate() — renders and sets the email subject using a Jinja2 template This allows you to replace %Net.MailMessage with TemplatedEmail.MailMessage in ObjectScript and gain dynamic templating: set msg = ##class(TemplatedEmail.MailMessage).%New() do msg.applySubjectTemplate(data,"New order from {{ customer.name }}") do msg.applyBodyTemplate(data,,"order_template.tpl") More details and usage examples can be found in the GitHub repository. Templates Are Not Just for Emails The template rendering methods can also be used for generating HTML reports, making it easy to reuse the same templating approach outside of email. With templated_email, you can create dynamic, professional, and maintainable emails for InterSystems IRIS — while leveraging the full flexibility of Jinja2 templates.
Announcement
Anastasia Dyubaylo · Jul 28

Time to vote in the InterSystems Developer Tools Contest 2025

Hi Community, It's voting time! Cast your votes for the best applications in our InterSystems Developer Tools Contest: 🔥 VOTE FOR THE BEST APPS 🔥 How to vote? Details below. Experts nomination: An experienced jury from InterSystems will choose the best apps to nominate for the prizes in the Experts Nomination. Community nomination: All active members of the Developer Community with a “trusted” status in their profile are eligible to vote in the Community nomination. To check your status, please click on your profile picture at the top right, and you will see it under your picture. To become a trusted member, you need to participate in the Community at least once. Blind vote! The number of votes for each app will be hidden from everyone. We will publish the leaderboard in the comments section of this post daily. Experts may vote any time so it is possible that the places change dramatically at the last moment. The same applies to bonus points. The order of projects on the contest page will be determined by the order in which applications were submitted to the competition, with the earliest submissions appearing higher on the list. P.S. Don't forget to subscribe to this post (click on the bell icon) to be notified of new comments. To take part in the voting, you need: Sign in to Open Exchange – DC credentials will work. Make any valid contribution to the Developer Community – answer or ask questions, write an article, contribute applications on Open Exchange – and you'll be able to vote. Check this post on the options to make helpful contributions to the Developer Community. If you change your mind, cancel the choice and give your vote to another application! Support the application you like! Note: Contest participants are allowed to fix bugs and make improvements to their applications during the voting week, so be sure to subscribe to application releases!
Announcement
Jonathan Gern · Jun 16, 2020

Intersystems Solutions Engineer- Full Time

My organization is looking for a full time Intersystems Solutions Engineer to join the team. Based in NY, the Solutions Engineer will design technical architectures to support efforts across the health system focused on clinical data exchange with other provider organizations and payors.
Question
Robert Bee · Feb 13, 2019

Intersystems Cache and MS Access Passthrough

Edit:May have found the issue but not the solution."SELECT * FROM wmhISTORYdETAIL" runs as a passthrough without asking for the DNS.but'SELECT Count([wmhISTORYdETAIL].[HistHMNumber] AS CountOfHistHMNumber FROM [wmhISTORYdETAIL] WHERE ((([wmhISTORYdETAIL].[HistMovType])='Receipt') AND (([wmhISTORYdETAIL].[HistMovDate])>=Date()-1) AND (([wmhISTORYdETAIL].[HistMovDate])<Date()));'asks for the DNS but both are linked to a table that has the password saved.Any Ideas please?RobHiI have created an MS Access database with a passthrough query to our Intersystems Cache WMS system. If I use "SELECT * from thetable" as the passthough query I can use VB.NET to query the passthrough and it works fine but this dataset getting rather large so I changed it to"Select field1, field2, filed3 from thetable" but the passthrough no longer works as it did.....it works in MS Access but not from the VB.NET app.The VB.Net Query is:SELECT Count([xxx].[HistHMNumber] AS CountOfHistHMNumber FROM [xxx] WHERE ((([xxx].[HistMovType])='Receipt') AND (([xxx].[HistMovDate])>=Date()-1) AND (([xxx].[HistMovDate])<Date()));where [xxx] is the passthrough querybut now I get an ODBC error in the VB.Net app"System.Data.OleDb.OleDbException: 'ODBC--call failed.'"The error/issue appears to be in the SQL but if Im lift it and paste it into the MS Access database. it works?!?!Any help would be appreciated.Many ThanksRob Hello Robert, Did you resolve this or log with our helpdesk? Regards David Underhill @ Chess
Question
Kurt Hofman · Jul 3, 2019

Using Intersystems Caché as a LDAP server

We would like to use our Caché-server as the source for our PABX-addressbook.The PABX only supports LDAP.Is it possible to use our Caché-instance as an LDAP-server ?Regards, Kurt Hofman. The native Cache LDAP support is only for an LDAP client.
Announcement
Neerav Verma · Mar 15, 2019

Intersystems Technologies : Connect with fellow individuals

Hello All,I have been associated with Intersystems technologies for over a decade working on Cache, Zen, Ensemble etc.This is a very niche field and a lovely community. I wanted to extend my hands to connect with people who are of same field or related to it.Here is my linkedin profile. Pls feel free to send me an invite or drop me a messagehttps://www.linkedin.com/in/vneerav/ Hi Neerav!Perhaps we just need to add the LinkedIn field in a member's profile?Would it help? What do you think? Yes. Definitely Issue is filed
Announcement
Neerav Verma · Jan 27, 2021

Certified Intersystems Professional Available on Contract

Hello fellow community members, I would like to offer my services as an Intersystems Professional and am available to work on projects. I have more than a decade experience into Intersystems stack of technologies including IRIS, Ensemble, Healthshare, Healthconnect, Cache Objectscript, Mumps, Zen, Analytics etc. with companies spread over US and UK involved in multiple domains. KEY SKILLS: Cloud Computing (AWS, MS Azure, GCP)Intersystems Technology Stack (IRIS, Ensemble, Healthshare, Cache, Mumps, CSP, ZEN, Analytics)Databases (Modelling & Backend database design, SQL, PL/SQL SOAP & Restful APIsAnalytics & DashboardsHealthcare Interoperability Standards (HL7, FHIR, EDI X12)Notations (XML, JSON) |Agile Frameworks & Tools (Scrum, Kanban, JIRA, Confluence)Dockers | Linux Recent CertificationsIntersystems IRIS Core Solutions Developer SpecialistIntersystems Health Connect HL7 Interface SpecialistMicrosoft Azure Solutions Architect ExpertCertified Scrum Master I am keen and open to work on exciting projects which are not only focused on Intersystems stack but also using cloud and having AI/ML functionalities would be wonderful. My ideal role would be a position where I am able to make a strong impact to the project.Current availability : 20 hours a week.Location : London, UK Please feel free to drop me a line and say Hellonv@nv-enterprises.biz / https://www.linkedin.com/in/vneerav/ RegardsNeerav Verma
Question
Padmini D · Nov 6, 2020

Unable to find Intersystems Cache` software

Hi All, I am new to InterSystems Cache and want to explore the database features for one of the use cases we have. I am trying to find the community version of it from in https://download.InterSystems.com but only found InterSystems IRIS and Intersystems IRIS health community versions. Please help me to download and install this. Regards, Sireesha You can download these versions. Community Edition just has a few limitations, but still can be used. And look at the installation guides Hello Dimitry/Team, can you please let me know the difference of Intersystems cache DB and intersystems IRIS, we are evaluating it in our POC to implement as a application solution. Hi Dmitriy/Team, what is the difference between Intersystems Cache DB and Intersystems IRIS ? I am looking for Cache DB installation details, but getting IRIS only everywhere. Thanks, Kranthi. IRIS is a kind of replacement for Caché, which now no active development. So, while you are evaluating it, you should not look for Caché, and switch to IRIS. Very generally speaking: There is nothing in Caché that you can't do with IRIS.The only thing you might miss eventually, are some ancient compatibility hooks back to the previous millennium. https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GCI_windows
Question
Abdul-Rashid Yakubu · Mar 22, 2022

Finding the median in intersystems cache SQL

Hi, Is there a way to find the median in Intersystems Cache SQL? I know it is not available as an aggregate function. Also in SQL Server I could try something like: SELECT ( (SELECT MAX(Score) FROM (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score) AS BottomHalf) + (SELECT MIN(Score) FROM (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score DESC) AS TopHalf) ) / 2 AS Median However, there is no PERCENT Keyword in Cache as well. Any suggestions? Thanks See Median in SQL As of IRIS 2021.1, we allow users to create their own aggregate functions. Perhaps there's a beautiful community contribution in there? :-) You could build something simple where you just stuff all values in a temporary global (the name of which you pass as a state) and sort them (using $sortbegin/$sortend), maintaining a count and then in the FINALIZE method gather the actual median value. Two caveats: don't bother implementing a MERGE function. We don't support parallel execution just yet. in some query execution plans, the FINALIZE method may be called more than once (e.g. if the aggregate is used in the SELECT list and say a HAVING clause). So you may want to cache your result somewhere (a PPG will do as this is in the last single-process mile of query processing, typically mere milliseconds apart) We'll be removing these annoyances in a future version SELECT TOP 1 AVG(main.age) AS _Average,min(main.age) AS _Min, CASE WHEN %vid = count(main.age)/2 THEN main.age else 0 END+MAX(CASE WHEN %vid = count(main.age)/2 THEN main.age else 0 END) AS _Median, max(main.age) AS _Max FROM ( SELECT TOP all a.Age FROM Sample.Person a ORDER BY a.Age ) main Thanks Randy!
Announcement
Todd Patterson · Sep 24, 2021

Looking for an accomplished Intersystems Software Developer

Intersystems Software Developer – Grand Traverse Plastics Corp. Location: Williamsburg, MI Note: This position is an ‘on site’ position. We are looking for an accomplished InterSystems developer to join our team. Grand Traverse Plastics is a fast growing and leading edge plastics injection molder. With 145 employees and 35 million in annual sales we offer an excellent place to work in one of the nicest areas in the Midwest. The candidate will assist in the development of our custom ERP system running on Cache. The software has continually evolved over 20+ years and is involved in every aspect of our business. We are looking for a candidate that can leverage their skill to help us interface with things from best of breed accounting packages, BI systems and IoT type devices on our plant floors. Qualifications: 5+ years with Intersystems Cache/Iris Cache Object Script as well as Object oriented class development In depth knowledge of data storage and design with Globals and Classes SQL, Angular, Java, Python experience helpful 2+ years with Ensemble Interoperability with various connectors and protocols (APIs, REST, SOAP, XML, EDI) Linux knowledge a plus Experience with any of the following: Deep See, Tableau, Power BI, Crystal Reports, Adaptive Analytics Creative and Innovative mindset Strong verbal, written and inter-personal skills Salary: 70k to 90k depending on skill level If interested, please forward your resume to tpatterson@grand-t.com Learn more about our exciting company here: https://www.gtpplastics.com
Question
Brian Daniels · May 30, 2016

Seeking to Hire Intersystems Caché professionals

Hello,I am not certain where to post this, but I am seeking to hire consultants with Intersystems Caché DBA experience. Is there a source for qualified professionals?Thank you!Brian Brian,For years this was the official InterSystems-sponsored site for this type of thing:http://skills.intersystems.com/However, it looks rather empty at the moment (I think things expire after 6 months or something like that). It wouldn't hurt to post your position there - perhaps with increased advertising on the Developer Community this will pick up in its usage again.HTH,Ben
Question
Kurt Hofman · May 7, 2019

Intersystems Caché Unicode and telnet-access

Hello,We're having troubles with working over Telnet on Caché Unicode with WRQ Reflection.We can't input extended characters (é,à,Ø,...), DELETE-key doesn't work, ...Has anyone a solution for working with WRQ Reflection or a decent alternative ?We tried Putty and Caché-terminal but these are not sufficent. Regards,Kurt Hofman. $zm = RY\Latin1\K\UTF-8\Reflection can show unicode's just fine, it's just that we can't input them ! Doesn't seem to work at all, ...The only thing that works is Caché Terminal, but soms F-keys don't work and our customer don't like it :-( The main thing I can suggest is to verify that the client and server agree on the encoding. It's been years since I've used Reflection; hopefully it supports UTF-8. Check your settings and/or documentation. When you're in a Caché session, look at the value of the $zmode special variable: USER>w $zm RY\Latin1\K\UTF8\ I'm not sure offhand what determines the default I/O translation table for a terminal, but if you see "RAW" instead of "UTF8", you can set it manually: USER>u 0:(/IOT="UTF8") USER>w $zm RY\Latin1\K\UTF8\ Hi Kurt,Some old terminal emulators cannot work with UTF8.I used AniTa which had the same problem connecting to a Caché Unicode server.I tried TeraTerm which is free and can at least work with UTF8 and VT320 emulation, but i haven't tried all our terminal tricks yet to see if it can do the job for 100%.Once you start TeraTerm, don't forget to change in Setup->General the language to UTF-8,.Setup -> Save Setup will save all your changes to a Teraterm.ini file so they will be in effect the next time.
Question
Jordan Everett · Mar 30, 2023

Intersystems Environment Requiring Values in Parameters

Hey all, I have been creating a class to handle file encryption by using GPG keys. I pushed my code out today and my encrypt and decrypt methods weren't working. About a half an hour later in troubleshooting I found out that it needed to be a syntax change. My method has three parameters to it. Examples below: This is how I was calling it in the test system with no issues: do gpg.Encrypt() This is how I was having to call it in my production system to work with no issues: do gpg.Encrypt("","","") If I was to enter in my production environment do gpg.Encrypt() I would just get an undefined due to it not interpreting my variables. It's like on my test system it infers my arguments if they're null, but on my production system they need to be passed in order to be interpreted. Is there an environment variable in Intersystems that I might be missing that would cause this behavior? This is just out of pure curiosity and isn't a true need, but I just found it interesting/peculiar. What does your method's argument list look like? If it's something like this: Method Encrypt(pVarA As %String = "", pVarB As %String = "", pVarC As %String = "") As %Status The pVar* variables above should automatically default to empty strings when the method is called as provided in your first example. I'm not aware of any system setting that would affect the behavior of unsupplied values for method arguments when they're not defined with an initial value (unlike those in my snippet above). That doesn't mean that there isn't one, though ... What's the Undefined config value on TEST and PROD: zn "%SYS" set sc=##Class(Config.Miscellaneous).Get(.p) write p("Undefined") Here is a snippet of my arguments. I don't have them set to a default value which wouldn't be a bad practice to get into anyways. Method Encrypt(pDirectory As %String, pDelete As %Boolean, pLog As %Boolean) As %Status On my production box it is a 0 and on my test system it is a 2. Well I guess there IS a setting (thanks, @Eduard.Lebedyuk!) The parameter Undefined specifies the behavior when ObjectScript attempts to fetch the value of a variable that has not been defined. The value of Undefined may be 0, 1, or 2: 0 - Always throw an <UNDEFINED> error. (default) 1 - If the undefined variable has subscripts, return a null string, but if the undefined variable is single-valued, throw an <UNDEFINED> error. 2 - Always return a null string. You can change that setting in System Administration | System Configuration | Additional Settings | Compatibility. There definitely does seem to be one! I went ahead and set the parameters in the Method and changed my test system to match my production system. Thank you guys so much!
Question
Manikandasubramani S · Nov 3, 2017

Remove remember password in intersystems studio

Hi guys, I have accidentally clicked the remember password option in my Ensemble studio. So it is now not asking for username and password and even the authentication popup is not showing every time i open the studio. Is there anyway to remove the remember password option for the cache studio. Thanks, You can do this via the following (it is a little hidden):Studio > File > Change Namespace > Connect > (select instance) > Enter credentials and uncheck "Remember Password"Could you please give this a try and let us know if it works for you? You can remove saved password from windows registryrun regedit.open path HKEY_CURRENT_USER\Software\InterSystems\Cache\Servers\choose serverremove Server Password