Use validation method in script

Use validation method in script

Postby e.feurich@indocs.nl » Wed May 21, 2014 6:26 am

Hi there,

I would like to use a project validation method (RegEx) in my script code.
I have this piece of code but I don't know what the icscxdocvalidationitem is and how I can use it.
Code: Select all
Dim pValItem As ICscXDocValidationItem
pValItem = ?:-|?

   If Project.ValidationMethods.ItemByName("IBANValid").ValidateSingleField(pvalitem, "IBAN NOT Valid")
      MsgBox("IABNis Valid",vbInformation)
      Else
      MsgBox("IBAN NOT valid",vbInformation)
   End If



IBANValid is the validation methode.
I assume that the valitem is the value of the indexfield?

Actually the question is what is a icscxdocvalidationitem and how can I use it in the project validation method script?

Hope someone can give some pointers

Eric
User avatar
e.feurich@indocs.nl
Participant
 
Posts: 31
Joined: Fri Jul 01, 2005 1:08 am
Location: Utrecht

Re: Use validation method in script

Postby dkekesi » Wed May 21, 2014 2:50 pm

No, that's the validation item object, that - among others - have the text property which holds the text value of the field.
The method itself is the validation method, so using it the way you do would cause cyclic referencing and wouldn't work. When you create a multi-field scripted validation rule (which is what you have in your example), then a code snippet is generated in that window. Use that and it will be quite straightforward how to work with ValidationItem objects.
Best Regards,

Daniel Kekesi
DocSoft Hungary
Image
dkekesi
Participant
 
Posts: 2569
Joined: Thu Dec 08, 2005 12:56 am
Location: Budapest, Hungary


Return to Kofax Transformation Modules General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests