TM1 perspective to send mails automatically

Post Reply
Marwa
Posts: 1
Joined: Thu Jul 19, 2018 7:58 am
OLAP Product: Cognos TM1
Version: ***
Excel Version: +++

TM1 perspective to send mails automatically

Post by Marwa »

Hey everyone,

First of all , sorry for my english level it's not my primary language :)

Here is my question: I have created an application in TM1 for ticketing (for my internship) ! I have created a cube with 4 dimensions : Tickets, year, month and TicketInformation ! Tickets are activeforms that opened with tm1 web and that uses Action button which lanches a process that stock information in my Cube.

Now I want to do something such as sending an automatic mail to a group of users everytime a specific data in the cube is changed ! They ask me to do that, I searched a lot but didn't find anything ! Should it be a process with a button action ? or should it be something else? is there any existing script for this ? I really have no idea from where I could start.

Thank you in advance :))))
User avatar
Elessar
Community Contributor
Posts: 331
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: TM1 perspective to send mails automatically

Post by Elessar »

Hello,

TM1 itself cannot send e-mails. You need to launch a TI-process launching a PS script sending the e-mail

This was discussed here:
http://www.tm1forum.com/viewtopic.php?t=11815
http://www.tm1forum.com/viewtopic.php?t=12453
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 6th article - PAfE + VBA: Commit each cell without pressing “Commit” button.
tomok
MVP
Posts: 2831
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TM1 perspective to send mails automatically

Post by tomok »

Marwa wrote: Thu Jul 19, 2018 8:48 am Now I want to do something such as sending an automatic mail to a group of users everytime a specific data in the cube is changed ! :))))
You can send emails via a TI process as has been mentioned but here is the rub, how are you going to know when the specific data you are referring to is changed? There is no event monitoring available to you that can trigger something when data is changed so you would have no idea when a user has changed the value in a specific cell in a specific cube. If you are the one changing the data AND you are performing the change by running a TI process you could branch off and send an email but if you are just entering data in a cube view or web sheet then you won't be able to send an automated email. You would have to manually kick off a TI process after you manually entered the data.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1 perspective to send mails automatically

Post by Wim Gielis »

tomok wrote: Thu Jul 19, 2018 12:58 pmThere is no event monitoring available to you that can trigger something when data is changed so you would have no idea when a user has changed the value in a specific cell in a specific cube.
True but Excel has event monitoring like changing a certain cell or range. If you translate the cell change in Excel to the cell in the cube, I think it is not impossible. However, as I now notice, TM1 hooks up onto Excel events, so maybe that's a factor to take into account.

You use Perspectives and hence macro’s, so events are possible. In the past I created a double click event in VBA to add new lines in an input sheet (and other related stuff).
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
vino1493
Posts: 30
Joined: Tue Mar 14, 2017 12:01 pm
OLAP Product: cognos tm1
Version: 10.2.2
Excel Version: excel 2013

Re: TM1 perspective to send mails automatically

Post by vino1493 »

Marwa,

As you mentioned that "Action button which lanches a process that stock information in my Cube", I assume you are asked to send emails whenever the Action button gets clicked. In that case, you can update that TI process being called by the action button. I hope you have some good understanding on TI processes. If the load complet
Go the prolog section of the TI process and paste the below code

Code: Select all

	
#Initiate all the required variables
	sPsCmd = '"& {
	Send-MailMessage 
	-From ' | pFrom | ' 
	-To ' | pTo | ' 
	-cc ' | pCC | ' 
	-Subject ' | '\"' | pSubject | '\"
	-Body ' | '\"' | pBody | '\"
	-BodyAsHtml 
	-SmtpServer ' | pSmtpServer | ' 
	}"';

# Calling the PowerShell command to send email
ExecuteCommand ( 'powershell.exe -command ' | sPsCmd, 1 );

You need to know the "SMTP server" for sending ( it is mandatory). Talk to your admin team to get this. Provide the values of 'pFrom', 'pTo', etc., before pasting the above code.
Post Reply