locked
Capturing the duplicate entries Sharepoint RRS feed

  • Question

  • Hi All,

     I have a Sharepoint List. In that i have a "Single Line" Title column..
    Say , i have one entry with value "BETTA" in Title.

    If i enter another value with "BETTA" in Title, i need it to be reflected that in the list after it gets saved.

    Can i use Conditional formatting to acheive this, or any other method is feasible?

    Thursday, September 12, 2013 12:37 PM

Answers

  • It's not easy.

    For it to work you've got to draw each row, and for each check to see if there are more entries that match them. To only display the second item you'd also have to have enough complexity to be able to undestand the number of the item (ie. first, or not first).

    CSS won't do it, you'd need to use either jQuery or XSLT to control the colour. For jQuery it'll only show items that are duplicated on the same page of results, which is fine if you've ordered the results in a way that ensures duplicate titles are next to each other. Custom C# can of course manage it but that might be overkill.

    XSLT can check the entire result set for duplicates, with the obvious impact to performance.


    • Edited by Alex Brassington Friday, September 13, 2013 7:38 AM
    • Marked as answer by JasonGuo Thursday, September 19, 2013 10:18 AM
    Friday, September 13, 2013 7:37 AM

All replies

  • any help?
    Thursday, September 12, 2013 3:25 PM
  • Hi,

     Why don't you try with Event receiver to find the duplicates?

     If you can use event receiver please try to refer the below link.

    http://sharepoint.stackexchange.com/questions/60684/event-receiver-to-block-duplicates-of-same-item-on-sharepoint-list

     

    
    
    

    Sekar - Our life is short, so help others to grow

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Thursday, September 12, 2013 4:42 PM
  • You could set the title field to require a unique entry.
    • Proposed as answer by Expiscornovus Thursday, September 12, 2013 6:34 PM
    • Unproposed as answer by Betta123 Friday, September 13, 2013 6:17 AM
    Thursday, September 12, 2013 5:39 PM
  • Hi Alex,Sekar

    i think i havent clearly explained.. sorry for it..
    actually i need to have all the entries, including duplicates.. but i want to show those in the interface .. hope i am clear..

    Friday, September 13, 2013 6:24 AM
  • Do you want to highlight those duplicates with some color?


    Sekar - Our life is short, so help others to grow

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Friday, September 13, 2013 6:35 AM
  • yes, something like that.. i just want to show that, second time the value is present in this list
    Friday, September 13, 2013 7:31 AM
  • It's not easy.

    For it to work you've got to draw each row, and for each check to see if there are more entries that match them. To only display the second item you'd also have to have enough complexity to be able to undestand the number of the item (ie. first, or not first).

    CSS won't do it, you'd need to use either jQuery or XSLT to control the colour. For jQuery it'll only show items that are duplicated on the same page of results, which is fine if you've ordered the results in a way that ensures duplicate titles are next to each other. Custom C# can of course manage it but that might be overkill.

    XSLT can check the entire result set for duplicates, with the obvious impact to performance.


    • Edited by Alex Brassington Friday, September 13, 2013 7:38 AM
    • Marked as answer by JasonGuo Thursday, September 19, 2013 10:18 AM
    Friday, September 13, 2013 7:37 AM