searchBuilder.preDefined.logic
Set the logic operator for a predefined group.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This is allows the initial logic to be defined for groups within predefined searches. The default is AND
logic and this will be used if no value is provided.
For more information on preDefined searches please refer to either the searchBuilder.preDefined
option or the manual page.
Type
Default
- Value:
AND
The default value for the searchBuilder.preDefined.logic
option is AND
meaning that the initial logic applied to the predefined group will be AND
logic.
Examples
Simple single level search with AND logic:
$('#example').DataTable( {
dom: 'Qlfrtip',
searchBuilder: {
preDefined: {
criteria:[
{
condition: '=',
data: 'Office',
value: ['Edinburgh']
}
],
logic: 'AND'
}
}
});
Simple single level search with OR logic:
$('#example').DataTable( {
dom: 'Qlfrtip',
searchBuilder: {
preDefined: {
criteria:[
{
condition: '=',
data: 'Office',
value: ['Edinburgh']
}
],
logic: 'OR'
}
}
});
Related
The following options are directly related and may also be useful in your application development.