TM1 Explorers: Explore, Challenge and Summit with TM1 › Base Camp Forums › TM1 Technical › Turbo Integrator › Send Email Attachment
Tagged: Dimension, email, Parameters, Subset, Turbointegrator
-
Send Email Attachment
Posted by John Fredy on 16-Apr-21 at 9:09 amHi guys, I am generating several csv files (one for each cost center), my cost center dimension includes an email address. I am using a Turbointegrator process that work fine, but only if I write into a vCostCenter parameter each code. For instance, I write 11020 and the process look into the dimension the email address for Cost Center 11020 and get the csv file “11020.csv” and email the file correctly. What I really need to do is avoid to write the Cost Center, just run the process and do the job itself, scanning all dimension elements.
Andrew replied 3 years ago 3 Members · 5 Replies -
5 Replies
-
2 Diamonds14 Gold2,180 ExperienceHiker
Hey John,
I’m a little confused here.So please correct my understanding.
You want to send an attachment of a CSV for a Cost Centre to the email address identified in the Email attribute for that specific Cost Centre.
Is that correct?
Thanks
John
-
0 Diamonds2 Gold130 ExperienceScout
Hi, yes you are correct. I can do this now, but manually, I mean, using a parameter pCostCenter, I enter the codes, one by one, but I am sure there is a way to do it automatically, just run the process and send all emails at once. Thanks for your reply.
-
0 Diamonds0 Gold470 ExperienceScout
Hi John,
You could do this automatically. I guess it depends a bit on the way your code is currently written. From what I have read above you have a process that has a pCostCentre parameter and you run the process enter the Cost Centre and it creates the file and emails it. You then run it again for the next cost centre etc etc.
What you could do here is have a Subset of the Cost Centres you need to process and use that as your Data Source. This process would then call your existing process passing the Cost Centre to the parameter so it is all automated.
So on your Datasource tab you would have the subset defined for example
“Instance:Cost Centre->CCList” (CCList is the subset)
You would have 1 Variable such as vCC and this would be Type=String and Contents=Other
Prolog does not have anything
Metadata Tab would have code such as
IF (ELLEV( ‘Cost Centre’, vCC ) = 0);
ExecuteProcess( ‘eMail Cost Centre’, ‘pCostCentre’, vCC );
ENDIF;If this does not make sense I would be happy to have a quick chat (via zoom or teams??) to discuss it further.
Cheers
Andrew
-
0 Diamonds2 Gold130 ExperienceScout
Andrew, thank you so much. You are right, I will check, The problem is where I put my code into, I Guess, there are code into prolog and I need to move it into data tab to achieve the automation.
-
0 Diamonds0 Gold470 ExperienceScout
John,
You could do it just on the Prolog Tab by using a loop, but you would still call the existing process.
Something like this
DimName = ‘Cost Centre’;
nCCs = DIMSIZ( DimName);
nCount = 1;
WHILE(nCount <= nCCs);
sCC = DIMNM( DimName, nCount);
IF( ELLEV( DimName, sCC) = 0;
ExecuteProcess ( ‘eMail CC Process’, ‘pCC’, sCC );
ENDIF;
nCount = nCount + 1;
END;
-
-
-
-
Log in to reply.