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 .)

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()
}

}

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

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).

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!

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.

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.

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);
}

}

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.

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...