Top 10 unique records in API

Dear All, thank you for such a wonderful product and I am truly enjoying it as backend for Adalo. I need one urgent help while pulling records from GET API call and steps in process are as follows:

step 1) GET API call to pull records from external database using user defined input
step 2) Store results in a variable to show only results of step#1
step 3) Execute For each loop
a) Condition1 to filter records
b) Take output from 3a and apply second condition to return only top 10 records

I am able to execute till step 3a above but need help for 3b. Really appreciate your support.


Hi @Achin14 - thanks for your first post and welcome to Xano.

This sounds like it could all be accomplished in one Query All Records function. You should be able to use the by Custom Query filter to filter the records (3a) and then use the Return settings under Output to return unique records and turn on paging+sorting to only return the “top 10” (3b).

If you provide specifics for the use case on each step, I can help walk you through it.

Thank you Michael for quick response. Let me try this and I will revert with the progress. :slight_smile:

Hi @michael, just to clarify that I am not putting data into a Xano local database table after first GET query. I was trying to manipulate data as I am fetching it. I will try steps suggested by you.