Sort and filter by count

Options

I have an Property table n-1 Floor table. And Floor n-1 with building table. Now im having a case that need to query building with sort and filter by Property record count. And Filter and Sort by Owner[] which is an field of Property. Can xano do this natively.

Thanks alot.

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    I'm not sure if I understand your structure of data correctly, do you want to filter sort and filter by property and owner at the same time?

    Have you tried sort filter? You can assign your initial query to variable and sort it using that.

  • lpnhox
    lpnhox Member
    Options

    Hello @Pawel Magdanski, Thanks for you response. Im want to filter using the owner count(which is an array field in Property table). And then Sort by either Property count and Owner count. Once at a time.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Ok so after joining the tables in query you can filter it directly there by owner count. Then create new variable and assign your query var or update you query variable directly and use sort filter where you need to specify the path to the particular filed that tou want to sort by.

    In case of an issue please share your function stack here.

    Hope it will help