Duplicate lines

Duplicate lines

54696d2054696d20 Posts: 75Questions: 18Answers: 0

I have a datatable the has duplicate lines. I need to get the duplicate lines for a student and compare the duplicate lines for the best value in certain columns to create one column for each


"StudentID":"432009", has 3 lines. I need to add some logic to compare each column and make one column with the best value (or one that a logic decides)

Not sure if this is something that someone has tried before or something that's kind of built in. I can add some logic in place to find the right value.

**note.. All values are a string. Would have to add something to convert the number strings to an int and compare.

This question has an accepted answers - jump to answer


  • allanallan Posts: 51,939Questions: 1Answers: 7,879 Site admin
    Answer ✓

    DataTables doesn't have anything built in to do that I'm afraid. Each row is 100% independent from the other rows, so there is no way to filter based on the content of others rows.

    Given that you are using data I'd suggest doing the search before you pass it into the DataTable. That way you can use just a plain Javascript for loop and keep the best result for each student, comparing to what has gone before.


  • 54696d2054696d20 Posts: 75Questions: 18Answers: 0

    @allan I just saw that you answered this. That's what I thought. So I built that logic before passing it to the front end.

Sign In or Register to comment.