scarecity
Posts: 0
Joined: Mon May 06, 2013 10:07 pm

Distinct results from database query

Is there a way to get distinct results back from a database request? I'm trying to build a nested list app and my first screen is a list of states. I would like each state listed once instead of however many entries are listed in my table.

scarecity
Posts: 0
Joined: Mon May 06, 2013 10:07 pm

Distinct results from database query

Thanks for the quick response Igor.

I've already got the list component setup, I guess I'm not sure where to add the query to filter it down to one item per line. Right now I've got a column called State in appery db and it's currently displaying like so:

California
Oregon
Oregon
Washington
Washington
Washington

I would like it to just be:

California
Oregon
Washington

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Distinct results from database query

You should change in "Parks_Parks_read_service" next parameters:

"URL" : "{database_url}/collections/Parks/distinct/City"
"Method" : "post"

Please look at "distinct" query in tutorial http://docs.appery.io/documentation/b...

Return to “Issues”