Reputation: 59
I'm exploring the Query builder component of Sensenet. enter link description here
On "Query Wizard" it is possible to search by "Content Type" and "Fields" (of the Selected Content)... Imagine that I have a Document Library, and the user customized the fields of his library (add more fields). Is it possible to search by the custom fields on the query builder? should I customize the Query builder component?
Upvotes: 1
Views: 103
Reputation: 10288
QueryBuilder has 2 tabs, one for a click-and-pick query ("Query wizard"), and one for editing the query ("Query editor"). If you know the name of the field you want to query, then the answer is "Yes". The QueryBuilder should pull all of the content and fields for your content. Also, if you have a custom Content created by defining a new Content Type then all of those fields will be exposed in the QueryBuilder.
As an example, if you were searching Documents (of type File
) and the custom field name was MyCustomField
and you were searching for the value foo
in this field, the query in the Query editor would look something like this:
TypeIs:File AND MyCustomField:foo
You can toggle between the wizard and editor to validate the query. Please submit another SO question if you need to know how to query for the name(s) of the custom field(s).
Upvotes: 2