Posts tagged email
Emailing to all members of a group
0I have written a simple process which lets you email to all members of a group
This process takes in the name of a group as input parameter and emails to all members of the group
Before invoking the process make sure you have set the configuration settings of the email component(the last step of the process)
Click here to get the pdf file which has the process
Click here to get the pdf
Let me know if you have any further questions
thanks
girish
—-
Original article at http://eslifeline.wordpress.com/2009/02/10/emailing-to-all-members-of-a-group/.
Modifying email when emailing a form
0Very common request – I am able to email a pdf form great, but how do I change the email recipients,Subject,Body. I found a very useful post on Stefan Cameron’s blog
http://forms.stefcameron.com/2008/08/28/submitting-form-data-by-email/
I copied his code to create a similar form
The form is posted hereClick here to get the pdf
This form submits the whole pdf as email attachment.
If you are using Acrobat 8.x and above you will have no problem is testing the form out
But if you are using Reader to test the form, it will not work unless you Apply Reader Rights
The instruction to apply Reader rights are here
http://eslifeline.wordpress.com/2008/05/14/submit-pdf-by-email/
Let me know if you have any questions
Thanks
Girish
—-
Original article at http://eslifeline.wordpress.com/2009/01/28/modifying-email-when-emailing-a-form/.
Extracting Data From Xml File
0Recently I was given the following xml
geebee@yahoo.com
tblue@yahoo.com
apink@yahoo.com
The customer wanted to email the persons listed in the emails element. They wanted to use the email component provided by livecycle. The email component takes a comma separated string when you want to email multiple people. So I used setValue component to extract the emai id’s and put them into a list. The list was then converted into a comma separated string of email addresses.
I also used the script component to accomplish the same. I have put both the solutions as file attachment . Feel free to download and deploy the lca and try it out
Click here to get the pdfhandling-repeating-elements4
—-
Original article at http://eslifeline.wordpress.com/2008/12/22/extracting-data-from-xml-file/.
Conditional set value using XPath
0
In my quest to use XPath functions & expressions more efficiently in LiveCycle I managed to achieve ‘conditional set value’ yesterday.
Example scenarios:
- Add some text to email body if some condition is true/false.
- Add some text into T&Cs if certain product is selected.
- In a generic/single Email or Set Value step you need to construct a big block of text. eg. Offer letter with certain paragraphs based on few conditions.
Approach 1: The usual way (or one of the usual ways):
An orchestration in Workbench with few setValue steps and few conditional routes to add/append the desired text to existing text.
And these steps need to be in certain order.
Approach 2: The XPath trick
I used substring() and number() function with pure XPath expression to construct conditional set value. See the usage below.
Example:
Consider a requirement in which you wish to send an email with few extra lines added to it if product A is ordered. And if contract term is 12 months then we need to add another T&C statement in the email body.
Let’s implement that with both approaches…
Approach 1: Few set value step and routing conditions to set process variables that get used in email body.
Process Diagram:
Email body:
Dear Provisioning Team,
Please send the below details to John.
System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}{$ /process_data/@ProductAConfigurationDetails $}
Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ /process_data/@TCFor12MonthsContract$}
blah
blahregards,
BOH Team
Approach 2: Conditional set value with XPath
Process diagram:
Email Body
Dear Provisioning Team,
Please send the below details to John.
System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}
{$ substring(‘This is where the actual text gets put about the product configuration’,
50000000 * (number(/process_data/@Product !=’Product A’))
) $}Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ substring(’12 Months T&C content is written here or can be xpath expression’,
50000000 * (number(/process_data/@ContractLength !=’12′))
) $}
blah
blahregards,
BOH Team
Explanation:
- The above expression marked in blue puts the text in email body if the condition at the end of it fulfills.
- By moving this logic into the email step itself I could clean up the process design significantly. I believe that LC is too good to do data transformation but common…few set value and few conditional routes for a simple text insertion?? I reckon the XPath trick gives much more cleaner approach to solve this.
- First thing to notice in the expression is the use of a large number 50000000 . This is used to return blank substring value if the expression is false. Please adjust if your input text can be larger than this.
- Second thing to notice is the use of comparison operator. I wanted to have 0 (zero) value for substring start value if condition is true. Boolean true is 1 so I’m using opposite operator. Eg. if(product=”Product A”) is represented as product!=”Product A”
As this is an XPath based expression we can use it in any LC component. I tried implementing if-else clause as well but that didn’t turn out well.
If you managed to read through this much then I’m sure you would love to see the undocumented ‘and’ ‘or’ keyword usage in XPath expression. I found that while experimenting and it’s an instant hit among few of my fellow LC users. It can be found here..
Let me know if you find this useful!!!!
—-
Original article at http://blog.pandyaparth.com/2009/11/conditional-set-value-using-xpath/.



