Validate data before passing to ProcessBatchData

HI,

Is it possible to validate the data before being passed to the ProcessBatchData?

Validation of data for example: If the column has datatype as DateTime, and a string is passed, the data should be validated. I mean the data should not be pushed to ProcessBatchData.

I have followed this link : http://www.arboundy.com/code/sharepoint/bulk-add-new-items-to-a-sharepoint-list-using-processbatchdata/

If yes, how to achieve it programmatically using c#?

Thanks

February 10th, 2014 12:09pm

Hi,

According to your post, my understanding is that you want to validate the data before execute the ProcessBatchData method.

If the column has data type as DateTime, I suggest you to validate  the data.

Code snippet:

public bool IsDate(string date)
{
try
{
   DateTime.Parse(date);
   return true;
}
catch
{
  return false;
}
}

Best Regards

Free Windows Admin Tool Kit Click here and download it now
February 11th, 2014 5:51am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics