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 )))
TM1 perspective to send mails automatically
- Elessar
- Community Contributor
- Posts: 340
- 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
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
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.
TM1 and Data Science blog: 6th article - PAfE + VBA: Commit each cell without pressing “Commit” button.
-
- MVP
- Posts: 2832
- 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
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.
-
- MVP
- Posts: 3118
- 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
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
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
-
- 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
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
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.
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.