What is considered an empty SharePoint list item when doing if else condition via JavaScript? "", null, or something else?

  • What field type are you checking? – Michael Colbs Oct 16 '19 at 18:34
  • @michael-colbs, Hello, string type – adams-j Oct 16 '19 at 18:36
  • if (listitem["field"]) only this should work – Arsalan Adam Khatri Oct 16 '19 at 18:41

I just did an alert to show what the empty list item was showing. It showed null. SO I i changed it to

if (whatever("whatever")==="" || whatever("whatever")=null)...

it now shows what I want to show.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.