Pluck returns blank values
Pluck returns blank values
nicoledramirez@hotmail.com
Posts: 60Questions: 14Answers: 2
Hello,
Have an issue with the pluck() function. it seems to be returning blank values. Any suggestion.
{
extend: "edit", className: 'btnSelect2', editor: editor, text: "Delete Leave Request", formTitle: "Delete Leave Requests",
formMessage: function (e, dt) {
var rows = dt.rows(e.modifier()).data().pluck('cdi_calendar_changes.date1');
return 'Are you sure you want to delete the entries for the ' +
'following record(s)? <ul><li>' + rows.join('</li><li>') + '</li></ul>';
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can't use
pluck
on nested data (cdi_calendar_changes.date1
).You'd need to do something like
.pluck( 'cdi_calendar_changes' ).pluck( 'date1' )
.To be honest I don't recall having tried that before, but I don't see why it wouldn't work...
Allan
Hi Allan,
Still comes up blank.
Opps. Disregard my previous post. Lack of sleep is frying my brain.
Your suggestion worked! Thank you!