iris-globals-contest

Downloads8
Subscribe
0
Bookmark
0
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Issues

What's new in this version

More screenshots in ReadMe

iris-globals-contest

This app imports data file into ^GLOBAL and counts transactions per month into ^COUNT global.

Prerequisites

Make sure you have git and Docker desktop installed.

Installation ZPM

USER>zpm "install iris-globals-contest"

Installation docker

Clone/git pull the repo into any local directory

$ git clone https://github.com/oliverwilms/iris-globals-contest.git

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

How to work with it

I looked for a menu to navigate between the different CSP pages. I used the existing menu.csp with no changes required.

Try it on your local installation http://localhost:57700/csp/user/menu.csp or - demo

screenshot

Go to Transact.csp page where the data can be imported. Alternative option from Terminal is shown below...

screenshot

If your IRIS has no ^GLOBAL, click Import button. It automatically calls class method to import data file into ^GLOBAL.

screenshot

After Import the button is replaced with Count button. If your IRIS has no ^COUNT, click Count button. It automatically calls class method to count Transaction data into ^COUNT. After Count the button is replaced with Menu button.

screenshot

You can run adhoc query by entering Start Date, End Date and Filter. Filter is currently only applied to Category. Click Preview button to run query.

Click Menu button to return to menu page.

Go to Count.csp page

It displays monthly totals for number of transactions and total debits and credits. Click on a table row to see counts for the selected month broken down by Categories. Click on Previous button to see counts for the previous month or click Next button to go to next month.

The top-down workflow of this app is the opposite of how the app was developed.

Data originates from Excel

screenshot

I decided to store the data in ^GLOBAL each cell getting its own node. You can try it out for yourself with this command:

USER>do ##class(dc.iris.util).ImportCSV()

The global looks like this: screenshot

I used Brendan Bannon's Article The Art of Mapping Globals to Classes (https://community.intersystems.com/post/art-mapping-globals-classes-1-3) to map ^GLOBAL to persistent class dc.iris.transact. Now it can be seen here:

screenshot

Next I created a CSP page where I could filter the transaction data at will.

I wanted to see transaction counts and totals for each category one month at a time. I accumulated data into ^COUNT with this command:

USER>do ##class(dc.iris.count).Count()

The global looks like this: screenshot

I created another CSP page to view the monthly data snapshots like this: screenshot

You see the above pictured page when you click on any table row of the summary Count.csp pictured below.

I wanted to see monthly totals for a series of months at a glance. Just open Count.csp from the menu: screenshot

Online Demo

You can find online demo here - demo

ZPM installation
zpm "install iris-globals-contest"
Rating
5 (1)
Category
Technology Example
Works with
InterSystems IRIS
Tags
Info
Version
0.0.3
Last updated
2022-04-03
Repository
Open
Documentation
Open
License
Link