Hello I am using the following code to search appery database.
return '{"$and" : [{"OldID": {"$regex":"^' + Appery("searchOldId").val() + '","$options":"i"}},{"L1": {"$regex":"^' + Appery("searchL1").val() + '","$options":"i"}},{"L2": {"$regex":"^' + Appery("searchL2").val() + '","$options":"i"}},{"L3": {"$regex":"^' + Appery("searchL3").val() + '","$options":"i"}},{"L4": {"$regex":"^' + Appery("searchL4").val() + '","$options":"i"}},{"L5": {"$regex":"^' + Appery("searchL5").val() + '","$options":"i"}},{"L6": {"$regex":"^' + Appery("searchL6").val() + '","$options":"i"}},{"Names": {"$regex":"^' + Appery("searchNames").val() + '","$options":"i"}}]}';
If a row has a value in every cell then that row will be searched.
If any row has one blank cell then that ROW will not be searched.
I need the above code to search the entire database no matter if a cell has data or not.
In the below image L4 is blank so If I search 3290 NOTHING WILL BE RETURNED. Which is wrong because 3290 exists.
In the below image L4 has data so if I search 3290 then the correct result will be returned.
I need the above code to search the entire database no matter if the cell has data or not.