Pax - Commit

Post Reply
chewza
Posts: 100
Joined: Tue Aug 17, 2010 11:51 am
OLAP Product: TM1
Version: 9.5
Excel Version: 7

Pax - Commit

Post by chewza » Mon Jul 27, 2020 9:21 am

Hi there

In perspectives, numbers were always committed automatically. In Pax, it seems like you have to click on the Commit icon.
Is there a way to avoit this and have data commit automatically as soon as you hit you enter key?

Many thanks!!

Regards
Chris

ascheevel
Community Contributor
Posts: 166
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.8
Excel Version: 2016
Location: Minneapolis, USA

Re: Pax - Commit

Post by ascheevel » Mon Jul 27, 2020 2:56 pm

Quick Reports have a type-in refresh option but that is only for automatically refreshing data after a metadata change. I'm not aware of type-in commit as a radial option. In the couple cases I've had where the end user asked for auto-commit after entry, I've used VBA to commit the active quick report on worksheet change. I put a toggle at the top of the page so they can turn the auto-commit on/off. The ActiveCell.Offset(-1,-1) in the code below assumes that the end user hits RETURN or TAB after making an input and this corrects for if the cursor is moved out range of the Quick Report where data was being modified. I also call a refresh sheet after commit regardless of end users' PAX settings for refresh after commit; the scope and necessity of the refresh could vary depending on needs.

Code: Select all

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("I2").Value = "On" Then
    On Error GoTo err_handler1:
        Reporting.GetCurrentReport(ActiveCell.Offset(-1, -1)).Commit True
        Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer.Application("COR", "1.1").RefreshSheet
End If
err_handler1:
Exit Sub

End Sub
PAX API documentation

User avatar
macsir
Community Contributor
Posts: 710
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365
Contact:

Re: Pax - Commit

Post by macsir » Mon Jul 27, 2020 8:50 pm

Thanks for sharing.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/

Post Reply