check if row exists by text, add row if not and update row if it does.

check if row exists by text, add row if not and update row if it does.

neburtonneburton Posts: 63Questions: 6Answers: 0

Our phone system is integrated into our application. Events are generated for incoming calls and changes to the status of those calls.

Each unique call generates a unique sessionid, but during each call additional events are created as the call status changes.

When a call is detected, I'm checking if a row exists containing the sessionid and if not, using row.add to add the call data to the datatable.

At the moment, I'm using a simple Jquery filter to check if the sessionid is in the table, but I'd like to do this check with datatables and return the index.

At the same time, these events contain call status changes, which I'd like to update to the table with this data, as there is a column for that.

So...

Can I easily look for the datatables row index where the row contains the text sessionID

and

can I easily update a cell within the same row, where the row contains the text sessionID

The sessionID is always in the second column, so we could get specific and just check that column.

Thanks

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.