How to replace Fail value with X?
How to replace Fail value with X?
ColdFlow
Posts: 6Questions: 3Answers: 0
I have this data table that will display the status of an inspection to display pass or fail. So far I have my code set up where if the inspection is 'pass' it will display ✔ and if it is 'fail' it will display X.
The problem I am having now is that if it is 'pass' or 'fail' it will display ✔. How can I rewrite my code to where it will display X?
Below is my code:
columns: [
{ data: "datetime" },
{ data: "forklift" },
{ data: "driver" },
{ data: "shift"},
{ data: "inspection"},
{ data: "status",
render: function(data,type){
if (type === 'display'){
if(data = 'pass'){
return "✔";
} else if (data = 'fail'){
return "X";
}
return data;
}
return data;
}
},
{ data: "completed"},
],
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I answered your question in your other thread. Please don't post duplicate questions.
Kevin