Question Evgeny Shvarov · Jun 5, 2018 $CASE For Long Stories Hi, Community!$CASE is a fine syntax sugar for "Ifs" with one-line/one-word expressions, like in docs: SET daynum=$ZDATE($HOROLOG,10) WRITE $CASE(daynum, 1:"Monday",2:"Tuesday",3:"Wednesday", 4:"Thursday",5:"Friday", 6:"Saturday",0:"Sunday",:"entry error") But if my expression for a current case is a multi-line business logic? Can I use "{}" somehow or better go with "IF" instead? #Code Snippet #ObjectScript #Caché 0 13 1 571
Question Evgeny Shvarov · Apr 13, 2018 Datatypes For Handling Date and Time in Persistent Classes Hi, Community!When I introduce a field to a persistent class to manage date/time what datatype should I prefer? %Date or %TimeStamp? And why? #Object Data Model #Caché 0 12 1 1.1K
Question Evgeny Shvarov · Mar 31, 2018 How to Call a Custom Listing in MDX? Hi, DeepSee experts! I need to call a listing programmatically other than the default. I can do that with %LISTING keyword. E.g. in Samples: #InterSystems IRIS BI (DeepSee) #Listings #MDX 0 9 0 483
Question Evgeny Shvarov · Mar 15, 2018 Deployment Strategies: Do You Compile ObjectScript on a Production Site? Hi, Community!Please share your experience on code deployment on production site. Do you compile ObjectScript on Production? Is it OK? Or you only compile on Test site and copy cache.dat to a Production? #Continuous Integration #Compiler #Deployment #Caché 0 22 0 1.1K
Question Evgeny Shvarov · Mar 7, 2018 How to Export DeepSee Pivots And Dashboards Into Files With Every Save Hi, Community!I'm using Git with DeepSee and when I need to do a commit to the git repo I'm exporting ALL the pivots and dashboards from the namespace. But I can forget to do that) And it can take time for a large system.What is the way to manage automatical export of DeepSee artefacts which we are editing in UI (Cubes, Pivots, Dashboards, Pivot Variables, Term lists, Shared Measures) into files every time when I push Save button? #Change Management #Git #Deployment #InterSystems IRIS BI (DeepSee) 0 5 0 484
Question Evgeny Shvarov · Nov 30, 2017 Index Globals: Take Away or Rebuild? Hi, Community!Consider you move data from one server to another or make a deployment with persistent data. What do you do with index globals?Is it always better to rebuild them or there are some cases when it worth to take them too? #Deployment #Globals #Indexing #Object Data Model #Caché 0 7 1 739
Question Evgeny Shvarov · Nov 30, 2017 How to Map Class Package to a Namespace Programmatically Hi folks!Is there a one line command to map class package A to Namespace ASPACE? #Code Snippet #Namespace #ObjectScript #Mapping #Caché 1 7 1 1.2K
Question Evgeny Shvarov · Nov 13, 2017 Trigger or Callback? Hi, folks!Consider I need to perform some logic which should fire because values of object properties has been changed.Is there ANY reason for using class callbacks %OnBeforeSave or %OnAfterSave instead of Trigger? #Database Transaction Processing #Object Data Model #ObjectScript #Caché 0 5 1 1.1K
Question Evgeny Shvarov · Nov 6, 2017 How to find duplicates for a large text field in Caché Objects? Hi, folks!Suppose you have a Caché class with %String property which contains relatively large text (from 10 to 2000 symbols).The class: Class Test.Duplicates Extends %Persistent { Property Text As %String (MAXLEN = 2000); } And you have thousands of entries. What are the best options to find entries which are duplicates on this property? #Indexing #Object Data Model #ObjectScript #Caché 0 26 1 1.4K
Question Evgeny Shvarov · Oct 30, 2017 Authentication options for Caché REST Application Hi, Community!Suppose If you develop a client js application which works with Caché server via REST API (CSP Gateway).What are the options for Authentication and working with Caché session then? #REST API #Authentication #CSP #Caché 1 9 0 1.6K
Question Evgeny Shvarov · Oct 22, 2017 How to Cancel The Execution of a Long Query in DeepSee Hi, folks!Suppose you called an MDX which takes a really long period of time.Is there any way to cancel its execution programmatically? #API #InterSystems IRIS BI (DeepSee) #MDX 0 2 0 430
Question Evgeny Shvarov · Oct 15, 2017 How to Upgrade Caché on Linux? Hi, Community!Say you have a standalone Caché server on Linux (E.g. Ubuntu) (no mirroring) and you have sudo access via ssh.What is the easiest, safest and simplest way to upgrade Caché to the new release? How do you do this? #DevOps #System Administration #Caché 0 4 0 590
Question Evgeny Shvarov · Sep 30, 2017 $CASE or $SELECT Analog in Cache´SQL Hi, folks! Is there any way to use $CASE or $SELECT functionality in SQL SELECT query? E.g. something like this: SELECT product, $CASE(status,"New":field1,"Payed":field2) as data from sales To see either in data column either field1 or field2 values in regard of status value. #SQL #Caché 0 3 0 883
Question Evgeny Shvarov · Sep 27, 2017 How to Automatically Grant Access For SQL Tables Which Are Involved in Listing of a Widget Hi, folks! When you deploy DeepSee solutions you often do not want grant a User %All Role to work with a particular Dashboard. Consider a Dashboard 'Dash' with a few widgets where listings are being used. If you manage a Role to get access to the Dash you need to grant access to %DB_DBNAME resource to have a database access, grant access to a Dashboard resource (if any) and ... grant SELECT accesses to all the tables involved in SQL queries being used in all the listings of widgets. #Dashboards #Access control #Security #SQL #InterSystems IRIS BI (DeepSee) 1 3 0 530
Question Evgeny Shvarov · Sep 4, 2017 What is The Best Backup Strategy For a Small-sized Database in Caché? Hi, folks! What could be the best backup/restore strategy for a small (less than 100MB) but very valuable database which is placed on AWS/DO virtual host? 1. Use AWS/DO backup/restore features? 2. External backup (as the most recommended)? 3. InterSystems backup? 4. Globals export to a zipped file? 5. cache.dat copy? #AWS #Backup #System Administration #Caché 0 2 0 696
Question Evgeny Shvarov · Aug 28, 2017 How to add a new line in email? Hi, folks! I'm sending emails with %Net.MailMessage. How can I add a new line for the email body? The code is: dim msg as %Net.MailMessage = ##class(%Net.MailMessage).%New() set msg.Charset="UTF-8" do msg.TextData.Write("Dear "_Username) do msg.TextData.Write("Line1") do msg.TextData.Write("Line2") And I'm getting in email: Dear UserLine1Line2 How can I get: Dear User Line1 Line2 #ObjectScript #Caché 0 8 1 1.8K
Question Evgeny Shvarov · Aug 7, 2017 %Status vs Other Return Values in Caché ObjectScript Methods Hi, folks!There is an interesting discussion in the neighboring topic which raises a question for me: is there any reason to have %Status as a return value for COS method? #Object Data Model #ObjectScript #Caché 1 16 0 2.8K
Question Evgeny Shvarov · Jul 31, 2017 How to programmatically obtain the URL for CSP application on a given server? Hi, folks!Suppose I have a CSP app, which provides some service.And the code of my App knows the name of the CSP App in form: /myappnameHow can I programmatically obtain the URL for CSP apps to send the full qualified link to the users(e.g. via email) of my app?E.g. https://productionserver.com/myappname #ObjectScript #CSP #Caché 1 6 0 532
Question Evgeny Shvarov · Jul 9, 2017 How to Get the Source Code of a Class on Remote Server? Hi, folks!I need to get the source code of a class installed on a remote server. I have no Studio or Atelier access to it but I can manage REST and Web terminal access.What is the easiest way for me to make it? #Debugging #Development Environment #Object Data Model #Terminal #Caché 0 4 0 479
Question Evgeny Shvarov · Jun 20, 2017 InterSystems Caché Project Files and Folders Hi, Community! How do you store the source files of your Caché project? What is the directories structure? What are the benefits? I prefer the following structure: /cls/package/subpackage/class.cls /mac/package/routine.mac /int/package/routine.int /inc/macro.inc /dfi/folder/sample.pivot.dfi Example Benefits: folders are packages. easy to understand what type of sources are in the project. What is your approach? #Change Management #Caché 2 4 1 1.3K