2

I want the user to input some values for some of the columns like title, department in text boxes or drop downs and then use them in the query to search the results. How can i achieve it?

0

To search on properties in SharePoint, we follow the guide Keyword Query Language (KQL) syntax reference. It states that property restrictions follow this pattern:

<Property Name><Property Operator><Property Value>

In other words, you search for a title like the following (without white spaces):

title:Reference

or if they where to search for more than one word in the title, users can use either one of the following queries:

title:Refer*
title:Reference*
title:"Reference Manual"
  • Thanks, how can i collect the input from user and make it a part of the query. For e.g. can I have a text box that collects department value and then i configure the query to be like department:<entered value>? – TheCoder Jun 21 '16 at 7:15
  • @TheCoder I guess you can do a bit of JavaScripting to show/hide property searches, where blanks isn't added to the search box. Add the rules of KQL and make a single functioning query of your properties, and do a lot of testing - before implementing in production. – Benny Skogberg Jun 21 '16 at 7:28

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.