Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Smarter duplicate detection for CSV import.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 202 Views
  • diamondsaw
    Community Member
    1 Post

    Smarter duplicate detection for CSV import. Link to this post

    Hi all,

    Let's assume I have an employee DataObject. If I'm implementing a custom EmployeeCsvBulkLoader class, I can specify a $duplicateChecks array with a key/value pair corresponding to employeeID to ensure no duplicate staff members are added to the database (assuming the employeeID is specified in the CSV file).

    This is all well and good but clueless administrators may not know the next available employeeID number to add to each employee in the CSV file (and why should they?). So how can I implement my EmployeeCsvBulkLoader class to detect duplicate rows based on a combination of: FirstName, LastName, and Office??

    I feel that this is a much more convenient way to import new employees. It seems like the inability to detect duplicate entries based on composite keys is a big oversight for CSV imports.

    Thanks in advance.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.