Unable to execute if conditions using REST

Unable to execute if conditions using REST

beginner_2018beginner_2018 Posts: 46Questions: 19Answers: 0
edited May 2018 in Free community support

Dear All,

I am accessing the data from SharePoint list items , And I had written the if condition to set the value if it is null.
But I continuously get the error.

Can any one please do let me know what's wrong in it

            "mData": "StagePlan",
            render: function (data, type, row, meta ) {
                if(data=="[object Object]" || data=="null")
                return "No Data ";
                return data;


  • allanallan Posts: 48,667Questions: 1Answers: 7,069 Site admin

    We'd really need a link to a page showing the issue so we can help to debug it.


  • colincolin Posts: 3,290Questions: 0Answers: 585

    Hi @beginner_2018 ,

    data=="[object Object]" looks odd, and I'm not sure it's doing what you want it to do, but I'd be surprised if that's causing the error.

    However, if you comment out all that columns.render code and just have return data, do you still see the error?



Sign In or Register to comment.