Ben Spead · Feb 6, 2017 go to post

Sergey - I also appreciate the point about the "component" approach (as we're using 1.x + Angular Material).  If you have any good references or tutorials on that approach (and/or contrasting with the 'typical' approach to do Angular 1.x), please post them :)

Ben Spead · Jan 23, 2017 go to post

Gaolai,

You need leading whitespace on any line of a routine which is not a line tag.  Try putting a space or Tab on your 2nd and 3rd lines.

Also, "Hello there!" isn't a valid COS command.  Try using:

   Write "Hello There!"

Ben Spead · Jan 10, 2017 go to post

If we change the unanswered query to only include questions with 'true' answers selected, do we expect everyone to be good enough citizens to go back and select true answers once they are provided?  Would admins be able to mark true answers if the author abandons the thread?

Ben Spead · Dec 22, 2016 go to post

Removed as requested (although I personally think that the screenshot makes people more likely to take a look at your code rather than less likely).

Ben Spead · Dec 12, 2016 go to post

For debugging or programmatic purposes?  If debugging / interactive you can just zwrite the variable to see the properties.

Ben Spead · Nov 10, 2016 go to post

Michael - thanks for the article.  It would be really helpful if you could add a paragraph at the top explaining what the Ensemble scheduler is and what it's main use-cases are so that people can tell quickly whether or not this is something which they would want to learn more about.  Perhaps as an Intro?

Ben Spead · Nov 10, 2016 go to post

I think that may be a custom routine.  I don't recognize it as a Caché-supplied resource. 

Ben Spead · Nov 10, 2016 go to post

My guess is that you are passing data somewhere as a string (because that is around the string limit). You need to use streams instead to store the uploaded file.

Ben Spead · Nov 1, 2016 go to post

Assuming you are a supported customer, you can download this from the Distributions page in the WRC application.

Ben Spead · Oct 31, 2016 go to post

This is not a Caché utility - it must be supplied by your application partner.  Also, the AP must be storing their own users at the application level because if they were using Caché users there would be no way to create a utility that shows Caché users' passwords (see Patrick's answer below).

I suggest you reach out to your application partner with this question (or if it is an inhouse development, speak with the development team)

Ben Spead · Oct 27, 2016 go to post

Sorry - I missed that.

Getting the "When" is easy - there is a timestamp in the header of the generated .INT code showing when the source was last compiled.  E.g:

 ;Sample.Address.1
 ;(C)InterSystems, generated for class Sample.Address. Do NOT edit. 10/27/2016 09:12:38AM
 ;;7A2F686C;Sample.Address
 ;
However the "Who" might prove to be more challenging. You might be able to accomplish this with a Method Generator that records the $Username and timestamp for access via a method or parameter?  See http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

Ben Spead · Oct 27, 2016 go to post

You can add logic in %OnAfterSave() for your object which will grab the object ID, $Username and the timestamp and tuck them away in an auditing table somewhere.  Alternatively you could add LastChangedBy and LastChangedTimestamp properties to your object and then populate them inside of %OnAddToSaveSet() (this is probably the most straightforward way to do it).

Hope that helps!

Ben Spead · Sep 29, 2016 go to post

Excellent idea to post this John - this isn't necessarily common knowledge but it is really useful to know!

Ben Spead · Sep 19, 2016 go to post

Anyone who doesn't need to support 2016.1 code should just use the new syntax.  This is intended as a 'bridge' solution to allow a code-base to run on both versions, and then after the code no longer needs to run on 2016.1 the macros should be removed when it is convenient.  

Ben Spead · Sep 14, 2016 go to post

Caché Object Script is a super-set of Mumps.  If you really want to know the differences you should look at the Mumps standard and know that anything you find in Caché which is not in the Mumps standard can be considered unique to Caché ObjectScript.

Hope that helps.

Ben Spead · Sep 1, 2016 go to post

I think I better understand now - you want 'other' tabs to dynamically update (without the user hitting Refresh) if the user changed namespaces in a separate tab, is that correct?

I think there are probably Javascript events that fire when a tab comes back into focus (you'd have to check) and you could use those to trigger a call to the server to see if the namespace has changed - if it has then redraw the tab to show the context of the proper namespace.  It would have more moving parts but it should be possible if you really want to do it.

Good luck!

Ben Spead · Sep 1, 2016 go to post

Playing around with it a little bit, I came to the following conclusions:

- *some* pages rely on the $Namespace url parameter in order to initialize what namespace it is pulling data from

- this doesn't appear to be stored in the session (and therefore it isn't shared between tab); I think it is only effective in the url

- there are some pages which don't honor the $Namespace url parameter (e.g. they still show %SYS even if $Namespace is defined to a different value); this is probably because those pages don't act on any namespace-specific data (or they act on data which lives ONLY in %SYS)

It sounds like if you want to keep your tabs in sync, you should put something in the session, and switch namespaces in your page logic.  Probably in OnPreHttp (although you'd need to test to make sure that the namespace sticks for the OnPage method as well)

Ben Spead · Sep 1, 2016 go to post

Laura,

Unless you are using web sockets, whenever someone makes a request from a web client it will issue a call back to the Caché server and it will be handled by a csp process which will spin up and go to a namespace and get the appropriate session variables, etc.  If I understand properly what you are looking to do, you could store the namespace as a session variable and then on each of your pages you can test the session variable on the request and reset to a different namespace if it isn't the default.  I believe that this is how the SMP does it (or something very similar).

HTH,

Ben

Ben Spead · Sep 1, 2016 go to post

Mike - it would be helpful if you hyperlink to "Newbie's Corner Index"

Ben Spead · Aug 30, 2016 go to post

Matthew - I can replicate what you see on b721 with my unit tests class that I wrote.  I'll do some digging and get back to you with what I find.