Following up on this from a recent customer conversation: the current best practices that we have settled on has been disabling exportselectivity as in Ben De Boe's post (https://community.intersystems.com/post/cicd-iris-sql), alongside ensuring AdaptiveMode is turned on (https://docs.intersystems.com/iris20243/csp/docbook/Doc.View.cls?KEY=RAC...). For now this will ensure that initially collected stats aren't overwritten, and once table statistics are collected automatically this should be completely "hands off".

Didn't realize that, sorry! I should have done more testing myself. I did some more research and found a way to do this in an object-oriented fashion: https://community.intersystems.com/post/get-property-maxlen 

I've confirmed that this works on a 2024.1.1 instance with the following steps:

set cdef = ##class(%Dictionary.ClassDefinition).%OpenId("<class name>")
Set count = cdef.Properties.Count()
for i = 1:1:count {if cdef.Properties.GetAt(i).Name = "<Property Name>" {w cdef.Properties.GetAt(i).Parameters.GetAt("MAXLEN")}}

For defining a fixed length string field in a class definition, you can use the MINLEN and MAXLEN parameters in tandem: https://docs.intersystems.com/iris20231/csp/documatic/%25CSP.Documatic.c...

This will not pad the string automatically, however, you would need to pad it to the desired length before saving an instance of the class.

To retrieve the MAXLEN, this answer to an earlier question may be helpful : https://community.intersystems.com/post/getting-parameters-cleanly-prope...

So the call might look something like:

$$$defMemberArrayGet(class,$$$cCLASSproperty,prop,$$$cPROPparameter,"MAXLEN")

EDIT: These macros aren't available on recent versions, here's an object-oriented way to do it (that's cleaner anyway):
 

I've confirmed that this works on a 2024.1.1 instance with the following steps:

set cdef = ##class(%Dictionary.ClassDefinition).%OpenId("<class name>")
Set count = cdef.Properties.Count()
for i = 1:1:count {if cdef.Properties.GetAt(i).Name = "<Property Name>" {w cdef.Properties.GetAt(i).Parameters.GetAt("MAXLEN")}}

Hello,

The Feature Tracker task is a built-in task that sends weekly feature usage reports to InterSystems. For more information, see the following documentation: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

As for the specific error you received when running it, I am not sure. I will confer with the developers and get back to you when I have an answer. In the meantime, though, it should not have any effect on other IRIS functionality.

One way to accomplish what you are describing is to use a temporary global: https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=GGB...

This allows you to store data in the IRISTEMP database that you can then retrieve like any other global. For example, if I were debugging a piece of code, I could write the following into the relevant Method:

SET ^CacheTempNP($INCREMENT(^CacheTempNP)) = <some debug value>

Then later ZWRITE ^CacheTempNP to see what I have logged.

(Note: In the documentation, we recommend using a global mapping to set up your own naming convention for temporary globals instead of using the ^CacheTemp prefix. While I still recommend doing that if you plan to use temporary globals in non-testing code, just using ^CacheTemp instead is fine for debugging.)

Rather than trying to assign some combination of predefined roles to accomplish what you are looking for, I would suggest defining a new role and assigning to it the privileges that you need. This documentation page has a guide on doing so: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=GSA...

That being said, is there something that your users need to do that is not covered by the %EnsRole_Administrator role?

For more details on the Interoperability > Manage > Deployment Changes category, both the 'Deploy' and 'History' options are controlled by the %Ens_Deploy resource, so your users would need a role with Use on %Ens_Deploy. You can see what resources control a given item in the management portal by clicking on the whitespace next to the item and viewing the 'System Resource(s)' and 'Custom Resource' listings. For more information on resources and privileges, see this documentation: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=GSA... . So, any role with %Ens_Deploy, e.g. %EnsRole_Administrator, should give you access.

I hope this helps!

The first error means that you aren't calling the method/routine correctly. See the <NOLINE> error code in this doc page: https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=RER... . Are you sure $$ConvertToMTime is the right name?

As for the second error: unlike most other programming languages, just calling a routine/method does not work in M/ObjectScript. Every line of code must use a command; in this case what you are looking for is the DO command: https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=RCO...

So, when calling a method/routine, you would write 'do ConvertToMTime(h,m,s)'

I'm not sure about TABLOCK specifically, but there are a couple other features that might help you solve this:

First, there is the LOCK TABLE statement: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RSQ...

There's also the objectscript LOCK command: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RCO...

You could use either of these to block the method while other instances of it are running and prevent the race condition. I'm not sure how efficient this method would be compared to TABLOCK, but it would fix the bug.

I hope this helps!

I'm not entirely clear on the question you are asking - if you just need to add quotes to a string, you can do so by escaping with another quotation mark. For example,

set b = """Cat""" // That's 3 quotation marks in a row on each side: one to open/close the string, two to add the quote character to the string

set c = b

w c
"Cat"

If you are asking how to display the quotes without actually adding quotes to the string, I'm not sure if that's possible - would need a more experienced dev to chime in.

I got an answer to this question internally and am reposting it here. From Daniel Bissex:

Using the MDX COUNT function is the slower of two options. We also have a provided Distinct plugin to address exactly this inefficiency:
https://docs.intersystems.com/iris20231/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&PRIVATE=1&CLASSNAME=%25DeepSee.PlugIn.Distinct

This uses our %KPI() function syntax, more detailed description of the calling options can be found here:
https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=D2RMDX_percentK

This reduced the runtime from ~5 minutes to about two seconds! The linked documentation is for IRIS 2023.1, but these functions are available in 2022.1 as well.