cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create generic Validation

SutirthaGupta
Level 4
Hi All, I want to create a generic validation function which validate the collections field. i.e. Suppose I have a collection like OrderID OrderName OrderDate MailID Note 1 Abc 12/04/2016 abc@def.com Note1 2 DFE 12/05/2016 abc@def.com 3 Abc 12/06/2016 abc@def.com Note2 Here, except note everything is mandatory. So I want to create another collection where I can put my validation logic like, ColumnID Column Name Type Function 1 OrderID Regular [Value] "" 1 OrderDate Regular IsDate() 1 MailID Regex ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$ In a loop I want to iterate through the records and do the needful. As a summary I want a function which will take Two collection as a i/p and it will return the validation result and the error message.
1 REPLY 1

John__Carter
Staff
Staff
Hi Sutirtha - you can't dynamically assemble and execute an expression like that in BP. You will have to loop through the collection and validate the data row by row using decisions etc. Conceivably you could push the raw data out to an Excel file preloaded with validation logic, but that would be just as much, if not more, work to set up and maintain.