Expand my Community achievements bar.

Is is possible to validate a form in a workflow?

Avatar

Level 3

I have  an .xdp form and .xml file with some data. Using renderPDFForm2 Operation I convert these two files into the pdf document. All this happans in a workflow/process, which is used by some external system. And after convertation a system receives the result pdf document.

So, the question: is it possible to validate pdf document in a workflow? For example, my validation script in a form contains some code for checking if a client age is above 18 y.o. So, if the input data contains client age = 17, i want to return to the system some sort of error, but not the resulting pdf.

An ideal solution which i want to find is some way to validate pdf form without dublicating validation code. Cause i have an idea how to check the age, using variables and expresions in a process. But in that case i'll have this validation both in pdf document (for example, to prevent users from printing not valid pdfs) and in a workflow.

2 Replies

Avatar

Level 10

Hi Victoria,

I have a validation script for PDF forms, you can use this script to validate the whole form to verify if any field returns null. This script is only to check if all fields are filled in. There is an exception array which you can insert field's names which you don't want it to be validated. You can then make your own validation for those fields included in the exception array.

So as an example, if your field age is named : txtAge

you would insert the name txtAge in the exception array:

You can use this template form to see how the function works:

Validation / Reset Functions, easy to manipulate and to change Forms!!!!

Hope this helps.

Avatar

Level 3

Thank you a lot for your answer, Magus069. But i can't get it, how can this help me? The script you've provided is just a validation script. It'll work in case i'll use my form in Acrobat Reader, trying to print it, or press Submit button. But the thing i want is to validate the form in  a workflow, during the proccess.