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 920
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.3K
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.5K
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 370
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 544
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 791
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 424
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 646
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 0 1.7K
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.5K
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 430
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 405
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.2K
Question Evgeny Shvarov · Jun 9, 2017 Caché Classes: How to Make a View on a Class to Manage Property Level Security? Hi, Community!Suppose I have class A with properties P1 and P2.I want to introduce class B, which would have same records as Class A, but only one property - P2.What is the easiest way to manage it assuming that I would like to use Class A to add records and be available for any operations to Users with Role A.And I would like to introduce class B for Users with role B for read-only access. Preferably they shouldn't even be aware of Class A and P1 existence .What is the easiest way to introduce it and manage it? #Data Model #Object Data Model #Security #Caché 0 10 0 669
Question Evgeny Shvarov · May 29, 2017 Globals vs Locals: What Is Faster? Hi, colleagues!Consider you need to put some (less than 1GB) data to an indexed array and do some data manipulations and calculations with it.Should I prefer global or local for it?Is there any general rule when local is faster than global and vice-versa? #Globals #Performance #Caché 4 5 0 1.4K
Question Evgeny Shvarov · May 26, 2017 What Is the Best Object Callback for Insert Operations: %OnBeforSave(), %OnAddToSaveSet(), %OnAfterSave() Hi!I'm saving object instance using RestForms.RESTFormsUI calls %Save() for me, which is great. But I want to set the property CreationDate with the current date for every new record being inserted.So object callback implementation seems as a reasonable option. I did the following: #Code Snippet #Object Data Model #ObjectScript #Caché 0 15 0 828
Question Evgeny Shvarov · May 24, 2017 Storage Schema in VCS: to Store Or Not to Store? Hi, colleagues!When you export the Caché ObjectScript code to VCS (Git, SVN, Perforce, etc) do you export the Storage schema for persistent classes? If so, what are the Pro/Contra?Thanks! #Beginner #Change Management #Git #Object Data Model #ObjectScript #Caché 0 20 0 1.9K
Question Evgeny Shvarov · May 18, 2017 How to Automatically Test DeepSee Pivots and Dashboards? Hi, colleagues!Suppose you have large set of cubes, pivots and dashboards in your DeepSee solution.Then you change the level, measure or dimension in the cube and is there any way to test that your new input didn't break current pivots, dashboards, etc?How to test this?How do you test your DeepSee solutions? #Change Management #InterSystems IRIS BI (DeepSee) #Testing 2 4 0 352
Question Evgeny Shvarov · Apr 11, 2017 How to prevent alert window from popping up on a Zen page Hi!Sometimes when I have Zen page in a browser (e.g. Management Portal page) and when my Internet connection interrupts, I see the alert window on the page, something like this screenshot: Is there any setting for the CSP web app to prevent this alerts from popping up? #CSP #System Administration #Frontend #ZEN #Caché 0 2 0 576
Question Evgeny Shvarov · Apr 9, 2017 Best practices for filtering widgets from different cubes in InterSystems DeepSee Hi!Sometimes I need to filter the widget on a dashboard from a different cube. And I face the following problem:Widget A refers to a query from Cube A and I want to filter Widget B from Widget B.Widget's B pivot refers to Cube B, and which has different dimensions for the same data.E.g. cube A has the dimension Author and the Cube B has the dimension Member for the same data. So there is no way to filter such a widget B from the widget A. #Dashboards #MDX #InterSystems IRIS BI (DeepSee) 1 1 1 319