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 421
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 644
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 426
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 403
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 826
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 351
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 574
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 318
Question Evgeny Shvarov · Apr 5, 2017 How to get the measure for the last day in a month in DeepSee Hi, Community! How can I manage to show in MDX query months where every month shows the value of the last month? Say, in HoleFoods the query: SELECT NON EMPTY [Measures].[Amount Sold] ON 0,NON EMPTY [DateOfSale].[Actual].[MonthSold].Members ON 1 FROM [HOLEFOODS] will show me the sum of revenue per month. This query: #MDX #InterSystems IRIS BI (DeepSee) 0 11 0 2.2K
Question Evgeny Shvarov · Apr 1, 2017 Is there a way to rebuild indices for all the classes in a given namespace? I'm moving *D globals from DatabaseA to DatabalseB.After importing globals I need to rebuild indices for all the imported persistent classes.Colleagues, maybe you know one command which does it for all the classes in Namespace? #Continuous Integration #Development Environment #Object Data Model #SQL #Caché 0 2 0 838
Question Evgeny Shvarov · Apr 1, 2017 Is there an option to export globals in archive? Hi, Community! Is there an option to get an archived file of globals in one command. Say for: Do $System.OBJ.Export("Class1*D.GBL,Class2*D.GBL","data_gbl.xml") get something like: Do $System.OBJ.Export("Data*D.GBL","data_gbl.gz","gzip") And also to have the convenient one click way to import it to the namespace via terminal or Control Panel? If anyone already has this module, share please? It would be very convenient for import/export/continuous integration purposes cause globals can be really heavy. #Continuous Integration #Globals #Development Environment #Terminal #Caché 0 8 0 842
Question Evgeny Shvarov · Mar 13, 2017 How to filter two widgets in DeepSee New_Window command? Hi! There is a 'New_window' control in DeepSee Widget which opens the page in a new tab in a browser with a given URL. With the help of this control you can open another dashboard and supply some parameters in SETTINGS clause. Consider I can setup in Dash1 the URL like: #InterSystems IRIS BI (DeepSee) #Dashboards #UI Development 0 2 0 217
Question Evgeny Shvarov · Feb 26, 2017 Named filter in DeepSee Hi!There is an option to introduce Named filters in Analyser and save it with the pivot.How can I make the Named filter available in a dashboard? #InterSystems IRIS BI (DeepSee) #Dashboards 0 2 0 257