TM1 Explorers: Explore, Challenge and Summit with TM1 › Base Camp Forums › TM1 Technical › Turbo Integrator › Send Email Attachment
Member16-Apr-21 at 9:09 am0 Diamonds2 Gold100 ExperienceScout
Hi 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.
Administrator16-Apr-21 at 9:17 am2 Diamonds14 Gold1,440 ExperienceHiker
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?
Member22-Apr-21 at 1:22 am0 Diamonds2 Gold100 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.
Member22-Apr-21 at 10:11 am0 Diamonds0 Gold340 ExperienceScout
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 );
If this does not make sense I would be happy to have a quick chat (via zoom or teams??) to discuss it further.
Member22-Apr-21 at 10:34 am0 Diamonds2 Gold100 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.
Member22-Apr-21 at 10:56 am0 Diamonds0 Gold340 ExperienceScout
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 );
nCount = nCount + 1;