Disabling Form Fields with validation

Many a times you would like to perform field level validations, before submitting the form by email. Also a lot of you would like to hide the submit button when the form is emailed to the end user
I have included a simple form which demonstrates this capability
Please click here to get the pdf
Click Here to get the pdf
Let me know if you have any further questions

Extracting Data From Xml File

Recently 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

Assembling Task Attachments

Lot of customers have a need to assemble task attachments into a single PDF at the end of the process for archiving. I have written a simple process which shows you the steps involved. I have made use of two custom components for this exercise.
The following document contains a process which assembles task attachments into a PDF
Click here to get the PDF
Let me know if you need any more help

Creating DDX from list of file names

Hi

I have written a simple component which creates a DDX from a list of file names. It is very common to create a package or assemble a map of documents. To do this you would have to create a DDX which needs to match the file names of documents in the map. To avoid all that hard work, I have a component which creates a DDX from list of file names.

The process also makes use of another component which writes out map contents to the file system

I have attached the process in the PDF file
Click here to access the PDF file
Click to get the PDF

Accessing Process Variable Names and Values

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

DATE MANIPULATION

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

Checking for Task Attachments when submitting an form

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