We are finding that when an Administrator logs in and uses the Query Builder mentioned in this post All users are returned as expected. But when a NON-Administrator runs the same query in Query Builder only the Users that are designated as Administrators and the User that runs the query are returned. Jun 17, 2013. The Query Builder is a powerful Drag-and-Drop query building GUI that allows you to make complex queries from your connected databases. While a basic understanding of SQL helps make the most of the Query Builder tool, most people will have no problem creating effective queries after a brief tutorial.
By default the Query Builder would also provide the number of hits. Depending on the result size this might take long time as determining the accurate count involves checking every result for access control. Mostly the total is used to implement pagination for the end user UI. As determining the exact count can be slow it is recommended to make use of the guessTotal feature to implement the pagination.
Get and display the accurate count of the number of total hits (SearchResult.getTotalMatches() or total in the querybuilder.json response) are less than or equal to 100;
Set guessTotal to 100 while making the call to the Query Builder.
The response can have the following outcome:
total=43, more=false - Indicates that total number of hits is 43. The UI can show up to ten results as part of the first page and provide pagination for the next three pages. You can also use this implementation to display a descriptive text like '43 results found'.
total=100, more=true - Indicates that the total number of hits is greater than 100 and the exact count is not known. The UI can show up to ten as part of the first page and provide pagination for the next ten pages. You can also use this to display a text like 'more than 100 results found'. As the user goes to the next pages calls made to the Query Builder would increase the limit of guessTotal and also of the offset and limit parameters.
guessTotal should also be used in cases where the UI needs to make use of infinite scrolling, in order to avoid the Query Builder from determining the exact hit count.
Query Builder Laravel
In the screen above, we have sorted the records by CompanyName (Ascending means A-Z) and by OrderDate (Descending means newest dates first). Note that the CompanyName field is listed first from the left, so the list will be sorted by Company Name, then if there are multiple records for a company, the newest order will be shown first. In the Criteria section, we are filtering to shown any record where the Company Name contains 'Research.' the 'Like' statement is very powerful, and lets you find records that begin with a word (Like 'Hello*'), end with a word (Like '*Hello'), or contain a word (Like '*Hello*'). All based on where you place the asterisk. Note that CompanyName is a text field, so the criteria needs to be contain in quotes. Next, we're going to exclude any records where the CustomerType is 'Residential' using the Not Equal to (<>) sign. We also want only records where the Order Date is less than 1/1/2008. Note that the pound sign (#) is used to contain dates in Access. Lastly, notice that the second line of the Criteria section starts with 'or:' and we've entered a criteria. You can use the second line to contain separate criteria sets. In this case, we want either any Company with 'Research' in the name that is not a Residential customer type and has orders before 1/1/2008 OR any record where the Ship Date is empty (that is what 'Is Null' means). If you have fields in your query you want to filter or sort by, but you don't want to see them in the actual results view, simply uncheck the 'Show' checkbox for that field. Access will still use it as criteria for sorting/filtering, but hide it in the Query View.