- I have a datamapper file.
- I have a field called DropCode
e.g. DropCodes: 111, 222, 333, 444, 555
- I need to send an email, that:
a) lists all the records that do not match those DropCodes listed above.
Is this possible?
Is this possible?
I would use a run script as a condition that checks your data field using a Switch Case in whatever language you prefer. After that configure THIS script to send you a email should the condition fail. You can modify your incoming data in the same conditional script and uncomment the MyMsg.AddAttachment in the script I linked to attach the data to the email. You would have to edit the email script to your outgoing email settings.
I would do this for you but I’m a bit busy at work atm. If I find time I can implement it but cannot promise. Perhaps a OL dev here might have a better more user friendly way.
select ‘output records in metadata’ or ‘output results in XML data file’. From there use a splitter to split the metadata or xml to separate records and it is just a matter of adding conditions to build the list
How do we read the data (in datamapper) from workflow? for example do we use the same code such as record.fields.DropCode ?
You helped work on this for me previously. You set up a vbscript to get this to work.
It works like a charm, however, we receive an email every day even when there are no letters with generic paragraphs.
Now, we’d like to receive an email ONLY when there is a letter with a generic paragraph.
I just ran my original process and I only get an email for data containing generic paragraphs. So I’m wondering if you changed the logic some how. Can you send me your Workflow process and perhaps a better data sample?
Ahh I see now, I ran a file that had no codes in it and I get an email with a blank file. Is that what you were referring to?
Yes, that is what I mean!
The easiest way to do this without changing the scripts or disrupting your current setup is to add a Text Condition just after the Rename plugin that checks if the log file is a zero byte file. Add %z to the String text box, the Operator to “is equal to” and 0 in the “Compare to string” text box. Then add a Delete plugin. Check out the screen grab below.
A quick question: Why are we putting this text condition before the Run Script, when the point is to find run through the script to find out whether there are generic codes being used or not.
If I put the text condition before the run script, how will it know?
Maybe I’m not understanding how this works?
Thank you for clarifying.
This is how it is set up:
(Text Condition) —> Delete
Run Script (Dim script to check generic codes in data.)
Send to Folder
I moved the text condition to after the run Script and it worked.
Thanks for your help!
The script you had seen in the screen grab I attached was not the script that I coded for you. It was the old email script which was set to ignore. (that is why it is grayed out) I should have taken a screen showing the script that creates the log before the Rename plugin. Sorry for the confusion, glad you got it working.