LiveCycle LifeLine Weblog

Accessing Process Variable Names and Values

October 6, 2008 · 5 Comments

Hi
I have written a simple component which lets you access process variable names and values for a given task. The component takes a taskID as an input parameter and return a HashMap of string which contains the process variables names and its values. Click the link below to access sample process which uses the custom component
Click to get the pdf file

→ 5 CommentsCategories: Uncategorized
Tagged: ,

DATE MANIPULATION

September 26, 2008 · 12 Comments

I just finished helping a customer who wanted to add X number of days to a date entered in a text field
The following was the use case. A form has 2 TextFields Start_Date and End_date
User enters a certain date in the Start_Date text field for example 09/24/08 (MM/DD/YY)
The End_Date should add 90 days to the Start_date and populate the End_Date
The following script would do that
var current = Date2Num(Start_Date.rawValue, “MM/DD/YY”)
var future = current+90
var newDate = Num2Date(future,”MM/DD/YY”)
form1.#subform[0].End_Date.rawValue = newDate

Validating End Date is later than Start Date

var diff = Date2Num(EndingDate.rawValue, “YYYY-MM-DD”) – Date2Num(StartingDate.rawValue, “YYYY-MM-DD”)
if (diff > 0) then
xfa.host.messageBox(“The End date is later than start date”)
else
xfa.host.messageBox(“PLEASE CHECK….The End date is before the start date”)
endif
I have added the pdf here.Please click here to check it out
Date Manipulations

→ 12 CommentsCategories: Uncategorized
Tagged: , , ,

Checking for Task Attachments when submitting an form

September 22, 2008 · 1 Comment

Very often there is a need to make sure the user has added an attachment to the task(Attachment added to the attachment tab).There is no out of the box way to find out if the task has attachments and prevent the user from submitting the form if there is no attachment

I have written a simple process which given a taskID would return the number of attachments associated with the task

You would then call this process from your form as a web service.The input parameter for the web service is going to be the value of the field AWS_TASKID which is part of the processfields.The return value of the webservice is stored in a hidden field.We then check to see if the value of the hidden field is “0″ which means there are no attachments associated with the task. All this logic is put in the click event of the AWS_SUBMIT button which is again part of the process fields.

I have put together a simple process which would explain to you the finer points. Click the following link to access the collateral for this process. The collateral are added as file attachments.Click the paper clip icon
Click here
let me know if you have any questions
thanks
girish

→ 1 CommentCategories: Uncategorized
Tagged: ,

Inserting Image in a XDP

September 5, 2008 · 14 Comments

A common use case is the ability to insert a image into a xdp and render the xdp into a PDF.To do this you will need to create a XSD with an image element. Then you will create a XDP using the XSD. Bind the fields of the xsd to the fields on the form.

Then you will have to merge the xml data into the xdp and render the xdp into a pdf.

I have attached a simple process which reads a xml file,extracts the image field out of the xml data, populates another xml variable with the image data and renders xdp with the data
I have included the XSD,XML file which has the image as base64 encoded string,XDP file.Click on the file attachments icon of the PDF
Click here to get the PDF
This process was built using 8.2 version. In 8.2 there are two new functions which allow you to encode a document object into a base64 string or get a document object out of a base 64 string. These are document functions

→ 14 CommentsCategories: Uncategorized
Tagged: , ,

Emailing multiple persons when a task is created

August 12, 2008 · 3 Comments

Hi
Common use case is the ability to email the form to multiple persons when a task is assigned to a person.
Livecycle ES provides the capability to email the form to the task assignee. But if you want to email the form to 3 other users, you would have to write a custom component to accomplish this. Click the link below to access the process

Emailing Multiple Persons when Task is created

→ 3 CommentsCategories: Uncategorized
Tagged: , ,

Passing xml data using events

July 9, 2008 · 9 Comments

Very useful feature in LiveCycle ES is the ability to associate xml data with events. This means you can bind your xml data with the events which your process throws. The process which receives these events can easily access this xml data. I have created a simple process which throws and receives events. When a event is throws you can pass the xmldata with the event. When you receive the event you easily access the xmldata elements. (To assign the event data to a process variable, make sure the process variable is marked as “input”)
Here is the link to the document which has the process collaterals. The process lca’s are attached and so is the xsd file which is used in the event message template

Click here to get the document

→ 9 CommentsCategories: Uncategorized
Tagged: , ,

Clearing the contents of List/Map

June 25, 2008 · 2 Comments

It is a very common need to clear the contents of a list or a map, especially when you are constructing a list or a map inside a loop.In LC 8.2 we have added a function to which allows you to clear the list/map contents

But for those of you using previous versions you can copy the following script and paste it in the ExecuteScript component

import java.util.*;
ArrayList list = patExecContext.getProcessDataValue(“/process_data/listOfPrincipalRef”);

((HashMap) patExecContext.getProcessDataValue(“/process_data/inputMapOfAttachments”)).clear();
System.out.println(“******Got list ,size is “+list.size());
((ArrayList) patExecContext.getProcessDataValue(“/process_data/listOfPrincipalRef”)).clear();
System.out.println(“******Got List,size is “+list.size());

Where listOfPrincipalRef is a list variable defined in your process,inputMapOfAttachments is a variable of type map defined in your process

Let me know if you have any questions

thanks

girish

→ 2 CommentsCategories: Clearing List/Map
Tagged: , , ,

Deadlining a group task when a task is claimed from group queue

June 16, 2008 · Leave a Comment

Hi
This is in response to a question on the adobe forumsHow do I deadline a group task after a group member has claimed it. Unfortunately livecycle ES does not have any out of the box capability to set a deadline on a task when it is claimed.To solve the question posted on the forum, I have written a simple process which can be used to get around the limitation for now.
The following document explains the work around and also has the process and the custom component I had to write to get this working
Re Assigining Task To group
Any question please send me a email

→ Leave a CommentCategories: Uncategorized

Importing and Exporting Form Data

June 4, 2008 · 14 Comments

A very simple but very powerful feature of Acrobat is the ability to silently import/export data with out user intervention. To do this you will have to certify the form, the end user will need to add the person who has certified the pdf in to his list of trusted identities and also give permission to execute high privilege java scripts.
The following document explain the procedure in detail,and also has a sample pdf, xdp and test data file as file attachments.
Click here to view the document

→ 14 CommentsCategories: Uncategorized
Tagged: , ,

Creating Nested Radio Buttons

May 24, 2008 · 8 Comments

Hi
Just returned from a customer visit,the customer had to convert a paper form in to PDF Form and this involved creating nested radio buttons. It was quite a challenge to get the radio buttons positioned correctly and making them visible/invisible.
I thought it would be a good sample to share.The trick is to have all the radio buttons as part of one exclusion group, then you manipulate its x and y positions to indent the child nodes of the radio button
The following link gets you to the form and the xdp
Nested Radio Buttons
Let me know if you have any questions/comments

→ 8 CommentsCategories: Nested Radio Buttons
Tagged: , ,