Hey all,
I’d like to return say only 10 results from the SC side, instead of getting all results then using the formatter on the AC to limit to 10 results.
Would using a paged query and then say putting ‘10’ in the ‘Limit’ field do the job?
Matt
Hey all,
I’d like to return say only 10 results from the SC side, instead of getting all results then using the formatter on the AC to limit to 10 results.
Would using a paged query and then say putting ‘10’ in the ‘Limit’ field do the job?
Matt
I’m pretty sure that’s exactly what you would do.
In server side, set it as a paged query. On the app connect side, in the server connect component, just type 10 in the Limit parameter and it will return just 10 records. (you could make this a dynamic user input field as well)
ok, great! If only I could ‘solve’ myself
Thank you for confirming, much appreciated.
In the SQL Query you can put a limit like this
SELECT * FROM Customers
LIMIT 10;
I was going to suggest this also if you’re using a custom query, but I was pretty sure @mgaussie was using standard. Good for other to know though.
Thank you both. I am using standard, haven’t ventured into custom but this might be a good simple way to start! I’ll test this out, thank you.
Depending on if you have another SQL DB manager (like MYSQL WorkBench or Navicat etc) i prefer to build the query in there (as they often have query building tools) and then copy/paste into Wappler.
I do have workbench, and have been becoming more familiar with that - so thank you for the tip there.
Yes, that's how you do this. When you want to limit the results of a query, just use a paged query and put a limit.