Peter Steiwer · Jun 6, 2025 go to post

It turns out this was a bug with parallel processing where the negative numbers in the data were more negative than the null marker caused data to be skipped. Development is fixing this

Peter Steiwer · Oct 7, 2022 go to post

Hi Ahmad,

These functions do not exist in MDX, please see the MDX function documentation here: https://docs.intersystems.com/iris20221/csp/docbook/Doc.View.cls?KEY=D2…

You likely want to use the %OR function: https://docs.intersystems.com/iris20221/csp/docbook/DocBook.UI.Page.cls…

Using %OR would allow you to reference multiple members, for example:
Expression="%OR({[Demographics].[H10].[Citizenship].&[USA],[Demographics].[H10].[Citizenship].&[U.S.A],[Demographics].[H10].[Citizenship].&[US]})"  

Peter Steiwer · Jun 11, 2021 go to post

What database is in /hs/nehi/ ? These protect errors suggest the user may not have permissions on this database

Peter Steiwer · May 27, 2021 go to post

I just tested and it worked OK for me. I used the following:

Class:

 Class DC.TestImport Extends %Persistent
{ 
Property TS As %TimeStamp; 
Property Bool As %Boolean; 
}

CSV:

2021-05-27 17:43:15,0
2021-05-27 17:51:13,0
2021-05-27 17:53:11,1

Import Settings:

File Name:
C:\Users\psteiwer\Documents\DC\testimport.csv
Charset:
<Device Default>
Schema:
DC
Table:
TestImport
Columns are delimited by:
Special Character: ,
First row contains column headers?
No
String quote:
double
Date format:
YYYY-MM-DD
Time format:
hh:mm:ss
TimeStamp format:
ODBC Format
Disable validation?
No
Defer Index Building with %SortBegin/%SortEnd:
No
Peter Steiwer · Apr 30, 2021 go to post

We also have a sample that uses %InjectFact() inside of the %OnBuildCube() Method. Documentation here.

This injects the cities "Cambridge", "Chelsea", and "Somerville" into the HoleFoods cube. These city members will exist in the dimension table, but there is no associated data (there could be, but in this example there isn't). When using the City level on rows and the default NONEMPTY, we see the following:

When we turn "Show Empty" on:

We now see these members with no data:

Peter Steiwer · Apr 20, 2021 go to post

Hi Evgenii,

I noticed this question has not been answered yet, is there a specific reason why you are looking into using a Data Connector? Typically before recommending a Data Connector, we would recommend that a new class is created and populated from a similar query that your Data Connector would have used. This allows for a lot more standard cube usage. Standard options like synchronization and detail listings would be available without needing to implement custom code to modify the SQL and they wouldn't require you to worry about using $$$RESTRICT

Peter Steiwer · Apr 16, 2021 go to post

By default, changing the display of the Week members is not available. However, you can create a custom time level by extending %DeepSee.Time.WeekYear and overriding a couple methods. Then you can change your timeFunction value in your cube definition. Here is a sample I put together that was MINIMALLY tested on a newer version than the version you noted here:

 Class CustomTime.WeekRange Extends %DeepSee.Time.WeekYear
{ /// Return the user-visible name of this level.
ClassMethod %GetName() As %String
{
Quit "WeekRange"
} /// Convert a level key value to a display value.
ClassMethod %KeyToValue(pKey As %Integer, pFormat As %String = "", pOffset As %String = "") As %String
{
Set tValue = "" Set tSC=..%KeyToBaseRange(pKey,.tStart,.tEnd,pOffset)
Set tValue=$zd(tStart)_"-"_$zd(tEnd-1)
Quit tValue
} /// Convert a $H value to the logical value used for this level.
/// This is used within the computed field logic for properties
/// within a fact table based on this level.<br/>.
/// In this case, we convert $H to an ISO Week: YYYYWnn
ClassMethod %Convert(pTime As %DeepSee.Datatype.dateTime, pTimeOffset As %String = "") As %Integer [ CodeMode = expression ]
{
$S(pTime="":"",pTime=$$$DeepSeeNullTimeMarker:$$$DeepSeeNullTimeMarker,1:##class(%DeepSee.Time.WeekYear).ISOWEEK(pTime))
} }

Peter Steiwer · Mar 17, 2021 go to post

This InterSystems IRIS connector will look at the Tables and BI Cubes that are defined on the system. I believe you can use the ODBC connector if you want to write your own SQL. Another option could be to define a view inside of IRIS and use the view with this connector

Peter Steiwer · Mar 15, 2021 go to post

You need to make sure "found" is being updated when the recursive call exits. This can either be done by reference (passing in .found) or simply as a return value (set found instead of do). It is always going through the full loop and never exiting early because once the value is found, it is never passed back up as being found. This means that the loop just continues on. Here are two examples of these solutions

if $isObject(value) {
             do ..JSONIterator(value,newPath,.SearchKey,.SearchVal,.found)
         }

if $isObject(value) {
             set found= ..JSONIterator(value,newPath,.SearchKey,.SearchVal,found)
         }

Peter Steiwer · Jan 19, 2021 go to post

You might also need to add:
Set mgr.IQN=SchemaName_"."_$Translate(TableName,".",$c(2))

Peter Steiwer · Jun 22, 2020 go to post

Hi Reid,

There is no current way to change the Axis Scale in a standard DeepSee chart. However, if you are using a third party charting library you are able to implement this. I added this capability to my Third Party Chart Library project.

For example you can turn your chart from:

into:


By just modifying one setting in the UI.

Peter Steiwer · Mar 23, 2020 go to post

If you are using %INSTALLER, you can use GRANT to assign a role:

<CSPApplication
   Url="/api/pivotsubscriptionsunsubscribe"
   Directory="${CSPDIR}"
   DispatchClass="PivotSubscriptions.UI.Unsubscribe"
   Grant="PivotSubscriptionsUnsubscribe"
   AuthenticationMethods="64"
/>

I have tested and confirmed that this does add the Application Role.

Peter Steiwer · Mar 13, 2020 go to post

Based on the documentation, it seems like this may be expected since $GET is expecting a variable, not a value returned from a method call. The main purpose is to protect against undefined references which a method call should never return since an empty string is different than undefined. Since the documentation mentions it accepts multidimensional object properties, it seems like it is assuming this is what the passed in reference is.

Documentation on expected values here.

Peter Steiwer · Mar 13, 2020 go to post

Hi Michel,

I am not exactly sure which type of stream you are using, but different types appear to override the Read methods.

For example:
%Stream.FileCharacter does not implement a Read method, but it extends %Stream.FileBinary. In %Stream.FileBinary, the Read method is defined as:

Method Read(ByRef len As %Integer = 32000, ByRef sc As %Status) As %RawString

Peter Steiwer · Mar 11, 2020 go to post

You can use GetOneStatusText:

USER>w $system.Status.GetErrorText(x)
ERROR #5002: ObjectScript error: <UNDEFINED> *yy
USER>w $system.Status.GetOneStatusText(x)
ObjectScript error: <UNDEFINED> *yy

Peter Steiwer · Mar 10, 2020 go to post

Hi David,

I see you used the "VSCode" tag. The couple of times I have done this in VSCode, I typically just import the XML classes into my system and then once they are loaded, I use the VSCode ObjectScript Explorer and export my classes from there into my project. I've only done it once or twice, so I don't know if there is a better way of doing it.

If you are interested, these are some methods for doing it manually as well that could be scripted to do all your files:

USER>do $system.OBJ.Load("C:\Users\psteiwer\Desktop\Class.xml")
 
Load started on 03/10/2020 17:40:03
Loading file C:\Users\psteiwer\Desktop\Class.xml as xml
Imported class: PivotSubscriptions.Utils
Load finished successfully.
 
USER>do $system.OBJ.ExportUDL("PivotSubscriptions.Utils.CLS","C:\Users\psteiwer\Desktop\Class.cls")

Peter Steiwer · Feb 29, 2020 go to post

If you can access it on the machine it is installed on, it is probably the case that there is just a firewall preventing access from other machines.

In a more advanced configuration, you will also need to consider settings on the web server

Peter Steiwer · Jan 30, 2020 go to post


<dataListBox  sql="select id from deepsee_study.doctor" onclick="alert('onclick');onchange="alert('onchange');ondblclick="alert('ondblclick');">
</dataListBox>

I tested this in the SAMPLES namespace on Cache for Windows (x86-64) 2018.1.2 (Build 309_5U) Wed Jun 12 2019 20:02:36 EDT. When clicking an item, I see the onchange alert. After double clicking the item I previously selected, I see the ondblclick alert.

Peter Steiwer · Jan 30, 2020 go to post

System Management Portal -> System Administration -> Configuration -> National Language Settings -> Locale Definitions

Please note that your browser will often localize content based on your browser settings, so the Management Portal may not look different after doing this, but if you open terminal you should see your newly selected Locale and if you do things like compile classes in Studio, you should see your output messages in the new Locale also

Peter Steiwer · Jan 23, 2020 go to post

Hi Scott,

The CSP folders will be located on your system where you have installed HealthShare. This means you can just move your images to this directory and then your apps should be able to reference them.

The documentation for the <image> tag has a few hints:

"If provided, src is the URI of an image to display. If src is the relative pathname of a file, it is understood to be relative to the Caché installation directory. Typically this path identifies the images subdirectory for your Zen application, for example:
<image id="myFrame" src="/csp/myApp/images/myPic.png" />"

Peter Steiwer · Jan 23, 2020 go to post

Are you still able to type?

Is it just Ctrl+C -> Ctrl+V that doesn't work?

Can you right click and use Copy and Paste?

When you use Copy, can you Paste to something that isn't Studio?

Peter Steiwer · Jan 3, 2020 go to post

Hi Mike,

As you have seen, Class files are stored within Caché and not on the file system. We have Studio hooks available as documented here. These allow you to write code to perform the export and import automatically as you interact with your classes in Studio. After files have been automatically exported, you will be able to run Git commands to commit and push your changes as desired.

Instead of doing all of this yourself, there does seem to be an Open Exchange app available that does something like this. I have not used this before, but @Alexander.Koblov may be able to add more details of how complete it is

Peter
 

Peter Steiwer · Jan 1, 2020 go to post

You can just check $$$ISERR(sc) directly here, you do not need to run it through $system.Status.GetErrorText(sc)  first.

$$$ISERR(status) will compile into ('status). In the case where sc=1, status will become = "". This means that 'status will evaluate to true when sc=1, which means it will think there is an error when there is not.

USER>set sc=1
 
USER>set status=$system.Status.GetErrorText(sc)
 
USER>zw sc
sc=1
 
USER>zw status
status=""
 
USER>w ('status)
1
USER>w ('sc)
0
Peter Steiwer · Jan 1, 2020 go to post

Hi Vivek,

Does something like this work:

Set file=##class(%Stream.FileBinary).%New()
Set sc=file.LinkToFile("D:/temp/test.png")
w $system.Status.GetErrorText(sc)
set contents=file.Read()
set base64contents=$SYSTEM.Encryption.Base64Encode(contents)
Peter Steiwer · Dec 26, 2019 go to post

Hi Lawrence,

I suggest opening a new WRC with Support. Here are a couple first step diagnosis options that can be helpful, but without a deeper understanding of the DeepSee Engine, it may be difficult to debug or correct the issues.

1) Run MDXUtils and produce a performance report.

This tool will kill your DeepSee Cache and then execute the query. It will log statistics about the query and the cube. It then runs the query a second time which will use the Cache that was just generated. Depending on the query, this can often be much faster.

2) Run DeepSeeButtons.

This will give a snapshot of your entire DeepSee environment. It will also look for recommended configurations and alert if the recommendations are not followed. For example, if the Database your Cache globals are stored in is journaled, this can negatively impact query performance. Lots of globals are modified during query execution, so it is recommended to not have this journaled. If DeepSeeButtons detects that the Database your DeepSee Cache is in is journaled, it will create an alert.

As I mentioned earlier, it is probably a good idea to contact Support, but these are two good steps to start with (and the WRC will probably ask for these as well)

Peter Steiwer · Dec 12, 2019 go to post

Would this be for a Development System or a Production System?

If it is a Development System you could consider using source control hooks to basically prevent people from modifying the class unless they first check out the file. If they attempt to modify it without first checking it out, they will get a message saying they need to first check out the file. If they do not have permission to do so, they will not be able to. If they do have permission to, using source control will allow you to revert any changes that end up causing issues.

If it is a Production System, you can consider using deployed mode. See documentation here. The documentation says: "You can open the class definition in Atelier, but it is read-only." (This is true for Studio also).

As you mention, making the Database Read Only is also an option.

Peter Steiwer · Dec 11, 2019 go to post

Hi Nael,

I was able to make this work using an XData Map (Documentation here). I have uploaded my Sample to GitHub so you can see how I implemented it. I will also summarize what I did here:

This Sample uses 3 classes: Teacher, Student, and TeacherStudent. As you describe and as your JSON output suggests, Teacher and Student have a reference to TeacherStudent, which simply has an ID. To allow this to output the link to the next object (depending on the direction) I had to use Calculated properties. This means I can access data from TeacherStudent, but I am not storing the references again. The calculations to get the Teacher/Student are pretty simple, just an SQL statement to get the related record. At this point, if you try and use %JSONExport() on a student, it will print out the teachers as expected, but then the teachers print out all the students, and the students print the teachers again. This continues until reaching an error.

To avoid this, I used the XData Map. One map for "Student" and one map for "Teacher". Each is named based on the starting point. When using the Teacher map, the Teacher class will output the name and the link to TeacherStudent. TeacherStudent will then output the name and the link to Student. Student will then output only the name and will not link back to TeacherStudent. The same is true for using the Student map for Student (but going the other way).

I hope this accomplishes what you are looking for!

Peter