I am trying to search records based on the 3 input strings.
But the record is not getting If the requested record columns don't have this any one of the values(Aadhar_ID__c, name, First_Name__c).
Please see the below image:
See in the below table, Let's assume, the database having 2 records. The 1st record having data with all the columns, the 2nd record doesn't have data in all columns i.e: don't have Adharcard value.
If I search 1st record with 'paul' using input string lastname (string we can in below code), The record is displaying. But if I search 2nd record with 'john' using input string lastname. The record is not displaying. Because 2nd record doesn't have adharcard value which we are querying in the search.
How to get the record even record columns don't have 1 or 2 values of 3. If we search with existing data.
[SELECT Aadhar_ID__c,name,First_Name__c FROM object__c WHERE Aadhar_ID__c LIKE :'%'+adharcard+'%' AND name LIKE :'%'+lastname+'%' AND First_Name__c LIKE :'%'+surname+'%'];