function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MadeForITMadeForIT 

I have a requirement in which i have to create 2 input fields City__c and Type__c of Hotel__c object in a LWC. Based on what user will input , i need to show a list of Hotel records matching the values that user has input. . How can i do that in LWC?

I think i will have to make dynamic SOQL query in an apex class 
and create input fields in lwc with a submit button. On click of the submit
button it will call a handler which will call the above class which is making 
a dynamic query to display records. Am i correct in my approach?? 
If yes then please guide me with the code as i am not able to write the required query. 
And if not then kindly guide me with the right approach.
Thank you in advance.
AbhinavAbhinav (Salesforce Developers) 
Check this blog for reference for dynamic search

https://www.salesforcecodecrack.com/2021/05/dynamic-searchcustom-search.html

Thanks!