I need assistance on how to exactly utilize the features of a filter paged query in a custom query.
I was able to figure out how to use Limit properly, but I am at a loss as to how to use Filter, Offset, Sort, and Dir.
Server Actions
Filter, Offset, Sort, and Dir are listed in the Global $_GET.
I have added them in the parameters in the custom query.
I was not able to test them because I do not know what the test values should be.
App Structure
Filter, Offset, Sort, and Dir are listed in the Input Parameters of the Server Connect. The Offset, Sort, and Dir values are empty. Filter has a value of the text search field on the page.
Sort and Dir and used by the supportable headers function for bootstrap tables, Sort if the field (column) , dir is the direction (Asc, Desc),
As you have discovered Limit is the number of columns returned and aligns to the SQL LIMIT keyword and offset is the file offfset from where to retrieve those records
They basically align directly with the SQL LIMIT and OFFSET clauses
Thank you so much for your reply. Do you know how to utilize the parameters in the custom query and then on the app connect side?
For example, the filter parameter used in a text field. I have it set in $_Global and as :P1 in the parameters of the custom filter. On the app connect side, I have the search text field value selected for the filter in the server connect.
But when I add the :P1 to a where clause I get no results. I have tried :P1, β:P1β, β%:P1%β with no success.
WHERE sp_shop_products.sp_product_name LIKE :P1
WHERE sp_shop_products.sp_product_name LIKE β:P1β
WHERE sp_shop_products.sp_product_name LIKE %:P1%
WHERE sp_shop_products.sp_product_name LIKE β%:P1%β
So which part is the issue? Is it definatley the where clause?
I cant help on such limited info
is the main query actually returning results (without the where, order, limit)
if so add the where to confirm that is the issue, is β2018β part of the product name?
Assuming you are replicating the βcontainsβ condition then try adding a set value stage, set a variable to β%β+$_GET.filter+β%β to add the wild cards then use that variable as the condition for :P1 which will have the wildcards already added