Page 1 of 3

Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 4:04 pm
by Marc6388140

Hello,

I’ve tried to follow the steps given in this post:

https://getsatisfaction.com/apperyio/topics/how_to_retrieve_distinct_values_from_a_collection

in order to have a list of distinct values of my database (field "COMARCA"), but I ‘m getting “undefined” as result instead of them . Here attached some screenshots of how I have configured the service:

Image

Image

Image

Image

Image

What am I doing wrong?


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 4:32 pm
by Kateryna Grynko

Hi Marc,

Tick "Array" for $, untick for other parameters.


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 4:44 pm
by Marc6388140

Thanks for your reply, Katya.

I've proceed as adviced, but,unfortunately, with the same results:

Image

Image


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 4:48 pm
by Marc6388140

However, the test request to the URL suceeds to retrieve the distinct values:

Image


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 7:25 pm
by Kateryna Grynko

Marc,

Create Response parameters in service Test tab. Your service returns an array of strings without ADRECA, TELEFON etc.


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 9:52 pm
by Marc6388140

Sorry, but I don't understand what you want me to do (newbie by now).


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 9:55 pm
by Kateryna Grynko

Marc,

Open your Service, Response Tab. You'll see 'Test' button. Click it. Then click 'Automatically create response parameters'. The parameters will be created based on actual service response.


Method for a List with Distinct Values?

Posted: Tue Nov 05, 2013 10:11 pm
by Marc6388140

OK Katya, I did it and then mapped a new "dot" parameter to the mobilelistitem. It works now, but just populates the list with the first item. How can I retrieve the rest of items?

Image

Image


Method for a List with Distinct Values?

Posted: Wed Nov 06, 2013 1:17 am
by Igor

Hello,

Please attach screen shot with your Database Collection fields like in tutorial http://docs.appery.io/tutorials/build...

It looks like you missed some steps from our tutorial.


Method for a List with Distinct Values?

Posted: Wed Nov 06, 2013 1:30 am
by Igor

Please share app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.