go to post Timothy Leavitt · Mar 29, 2022 On further review, you get a <FUNCTION> error from trying to start the line-by-line monitor when no routines are selected, and the work around is to change namespace to %SYS, do ^PERFMON, and stop the monitor. USER>zw ##class(%Monitor.System.LineByLine).Start("","",$job) "0 "_$lb($lb(5002,"<FUNCTION>zStart+45^%Monitor.System.LineByLine.1",,,,,,,,$lb(,"USER",$lb("$^zStart+45^%Monitor.System.LineByLine.1 +1","X^@ +1"))))/* ERROR #5002: ObjectScript error: <FUNCTION>zStart+45^%Monitor.System.LineByLine.1 */ In terms of using the test coverage tool, you should either put a file named coverage.list in your unit test root or pass the list of classes/routines in userParam as described at https://github.com/intersystems/TestCoverage . https://github.com/intersystems/TestCoverage/issues/11 covers the bad behavior you've seen and would prevent it going forward. (Subsequent attempts to start the line-by-line monitor will end up hitting error #6060 as described in https://github.com/intersystems/TestCoverage/issues/10 .)
go to post Timothy Leavitt · Mar 16, 2022 Here's a sample that loads interoperability system defaults from an XML file: Class Sample.CCREventHandler Extends %Studio.SourceControl.CCREventHandler { /// This method is called during the loading of an ItemSet, after the contents of the ItemSet have been loaded into the namespace, /// and after the ImplementCCR routine has been run Method ItemSetAfterLoadToNS() As %Status { set key = "" for { set item = ..ItemSetItemList.GetNext(.key) quit:(key="") if (key [ "backup/ens/defaults.xml") { $$$ThrowOnError(##class(Ens.Config.DefaultSettings).%Import(^Sources_"backup/ens/defaults.xml")) quit } } Quit ##super() } /// This method is called by the CCR Refresh logic, after the items have been refreshed into the namespace. It is intended for any additional configuration work which /// may be necessary (e.g. initialization of reference tables, building of 3rd party sources, etc) Method RefreshFinalize() As %Status { $$$ThrowOnError(##class(Ens.Config.DefaultSettings).%Import(^Sources_"backup/ens/defaults.xml")) Quit ##super() } }
go to post Timothy Leavitt · Feb 17, 2022 These would be set via the Configuration Registry, though it seems they aren't discussed in the docs for it. See: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=HXREG_ch_configuration_registry
go to post Timothy Leavitt · Jan 21, 2022 I'd run a query against %Dictionary.CompiledProperty where parent = (the classname)
go to post Timothy Leavitt · Jan 11, 2022 It looks like there might be an issue with the service you're trying to use - at https://apisidra.ibge.gov.br/ , pasting in "/t/1612/n2/all/v/all/p/last/c81/2702/f/u" as "Parâmetros/valores da API:" then clicking "Consultar" I get an alert saying "A solicitação de conexão com pools sofreu timeout". I also see this from ObjectScript with Server set to apisidra.ibge.gov.br instead of api.sidra.ibge.gov.br
go to post Timothy Leavitt · Dec 8, 2021 Here's a full example relating global size back to related classes/tables, expanding on @Vitaliy.Serdtsev's example: select sdef.parent "Class", class.SqlSchemaName||'.'||class.SqlTableName "Table", LIST(sdef.Location) "Globals", SUM(s."Allocated MB") "Allocated MB", SUM(s."Used MB") "Used MB" from %SYS.GlobalQuery_Size('C:\InterSystems\IRIS20\mgr\user','','*D,*S,*I',0,0,1) s join ( select parent,DataLocation as Location from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' union all select parent,StreamLocation from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' union all select parent,IndexLocation from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' ) sdef on sdef.Location = '^'||s.Name join %Dictionary.CompiledClass class on class.Name = sdef.parent group by sdef.parent Note that if you use inheritance with persistent classes sharing an extent this'll be a little bit off (since the same global is used for multiple classes and will be double counted).
go to post Timothy Leavitt · Dec 2, 2021 I feel like a broken record, but InterSystems Support is pretty awesome and probably a better place to start for deeper HealthShare issues than the Developer Community. (And at first glance this seems like a deeper HealthShare issue.) Though it would be great if you could circle back and say what the solution was once you have one in case someone else runs into this!
go to post Timothy Leavitt · Nov 29, 2021 @Peter (Sechaba) Tomodi I'd recommend reaching out to InterSystems Support on this.
go to post Timothy Leavitt · Nov 15, 2021 @Chris Marais This means that ^PERFMON or ^%SYS.MONLBL is already running somewhere on the system. If you do ^%SYS.MONLBL it should provide some helpful output/options.
go to post Timothy Leavitt · Nov 3, 2021 I wonder if the business host is running an old version of the class. (That would explain why the <UNDEFINED> reports a weird line of code, and why the error hasn't gone away after you fixed it.) Maybe try disabling + reenabling the business operation / restarting the production?
go to post Timothy Leavitt · Oct 13, 2021 One note here, $$Quote^%qcr will represent control characters with $c(decimalAsciiCode) syntax - like the newlines in this case. I think there's some more official classmethod that's equivalent, but I don't recall where it is off the top of my head.
go to post Timothy Leavitt · Oct 13, 2021 Hi Erica, $$$Text generates content into the message globals at compile time. Here's one way to solve the problem: Class Erica.DemoLocalizedXData { Parameter DOMAIN = "Demo"; XData LocalizedEmail [ MimeType = text/html ] { <body> <p> Text to be translated into another language </p> </body> } ClassMethod GetLocalizedContent(xDataName As %String) As %String [ CodeMode = objectgenerator ] { do %code.WriteLine(" Quit $Case(xDataName,") set key = "" for { set xdata = %class.XDatas.GetNext(.key) quit:key="" set data = xdata.Data.Read() // Assumptions about length here... do %code.WriteLine(" "_$$$QUOTE(xdata.Name)_":$$$Text("_$$Quote^%qcr(data)_"),") } do %code.WriteLine(" :"""")") } } After compilation you'll have: ^IRIS.Msg("Demo")="en" ^IRIS.Msg("Demo","en",3630108798)="<body>"_$c(13,10)_"<p>"_$c(13,10)_"Text to be translated into another language"_$c(13,10)_"</p>"_$c(13,10)_"</body>"_$c(13,10) If you want to localize individual strings in the XData block independent of the HTML markup that gets a little more complicated. I'd think it's simpler/possibly better to localize the entire block at once though.
go to post Timothy Leavitt · Aug 23, 2021 PBKDF2 is not a method of encryption, it's a method of hashing - e.g., it's one-way. Depending on what you're looking to accomplish (e.g., validating users against some external system), delegated authentication (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...) with a ZAUTHETNICATE routine (see https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...) might help.
go to post Timothy Leavitt · Jul 9, 2021 Internally, we've developed a mock framework for ObjectScript based on Mockito that can do exactly this (and many other things). If we're able to get it out on the Open Exchange at some point I'll let you know.
go to post Timothy Leavitt · Jun 24, 2021 I'd recommend using browser developer tools to inspect the CSS and see what's causing it - I wouldn't expect the rows to be particularly tall, but there could be stray CSS from somewhere else that is making them so. See docs on using Chrome's developer tools (for example - but they're all similar these days) here: https://developer.chrome.com/docs/devtools/css/
go to post Timothy Leavitt · Jun 23, 2021 I'd expect that to work provided the id (not name) of the combobox/dataCombo is 'MyCombo'. e.g., this works fine: Class DC.Demo.FindElement Extends %ZEN.Component.page { XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ] { <page xmlns="http://www.intersystems.com/zen"> <form> <tabGroup showTabBar="true"> <tab caption="Tab One"> <combobox id="MyCombo" editable="true" /> </tab> <tab caption="Tab Two"> </tab> </tabGroup> </form> <button onclick="zenPage.alertComboValue()" /> </page> } ClientMethod alertComboValue() [ Language = javascript ] { alert(zen('MyCombo').findElement('input').value); } }
go to post Timothy Leavitt · Jun 10, 2021 This is a little messy and I'm going to report part of the answer as a bug internally. But regardless, here's one way to make it work - in short, have all of the things that could be listed as a recipient extend a common parent class, and in that class override %JSONNew to detect which type it is. Class DC.Demo.Container Extends (%RegisteredObject, %JSON.Adaptor) { Property recipient As DC.Demo.Recipient; ClassMethod Demo() { for json = {"recipient":{"dob":"2021-06-10"}}, {"recipient":{"reference":"foo"}} { set inst = ..%New() do inst.%JSONImport(json) write !,json.%ToJSON(),!,$classname(inst.recipient),! } } } Class DC.Demo.Recipient Extends (%RegisteredObject, %JSON.Adaptor) { /// Get an instance of an JSON enabled class.<br><br> /// /// You may override this method to do custom processing (such as initializing /// the object instance) before returning an instance of this class. /// However, this method should not be called directly from user code.<br> /// Arguments:<br> /// dynamicObject is the dynamic object with thee values to be assigned to the new object.<br> /// containerOref is the containing object instance when called from JSONImport. ClassMethod %JSONNew(dynamicObject As %DynamicObject, containerOref As %RegisteredObject = "") As %RegisteredObject { // This is weird: shouldn't need to reference .recipient here if dynamicObject.recipient.%IsDefined("dob") { quit ##class(DC.Demo.Patient).%New() } elseif dynamicObject.recipient.%IsDefined("reference") { quit ##class(DC.Demo.Reference).%New() } else { quit ..%New() } } } Class DC.Demo.Reference Extends DC.Demo.Recipient { Property reference As %String; } Class DC.Demo.Patient Extends DC.Demo.Recipient { Property dob As %Date; } Output is: d ##class(DC.Demo.Container).Demo() {"recipient":{"dob":"2021-06-10"}} DC.Demo.Patient {"recipient":{"reference":"foo"}} DC.Demo.Reference Only problem is, %JSONNew (as advertised in class reference documentation) should get the %DynamicObject representing the object itself, not the parent %DynamicObject. This would only really work if each type is used in exactly one context like this, which seems unlikely.
go to post Timothy Leavitt · May 19, 2021 First off, it's generally best to avoid xecute. ;) In the first case, routine is private (it isn't visible in the xecute stack frame). In the second, it's public, so it is visible there. You could get the best of both worlds with: ClassMethod Run() { set routine="variable" set call="(routine) write routine,!" xecute (call, routine) quit } For more info see https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post Timothy Leavitt · Apr 12, 2021 Worldwide Response Center (WRC) For Immediate Response Phone:+1-617-621-0700+44 (0) 844 854 29170800615658 (NZ Toll Free)1800 628 181 (Aus Toll Free) Email:support@intersystems.com Online:WRC DirectEmail support@intersystems.com for a login.