Newbie: how to check Null variable
Summary:
Hi,
I have a JS function which get value from text boxes and construct a Where clause of REST q parameter. Now how to check if any parameter has NULL value the where clause should ignore it. Like if there is no docDate then the query should work for docName only and ignore docDate.
Content (required):
FlowModule.prototype.passParam = function(form,pDocDate){
var vParams = '\'*'+form+'*\'';
var query = 'docName like '+vParams+ ' AND docDate=\''+pDocDate+'\'';
var ret = {"q":query};
return ret;
}
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
Tagged:
0