Page 4 of 7
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Aug 01, 2013 4:15 pm
by maxkatz
Here is another way to do this:
Manually update the response to look like this:
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Aug 01, 2013 5:29 pm
by Shaun Summers
Thanks. A follow up question.
I initially wanted to return a distinct list for a column in the collection. I would now like to return a distinct list for the column but only where values in another column equal X.
How do I do this? I ask the question as the distinct URL seems to just focus on one column and hence even if I include a where clause (for values in another column in the collection equal to X) it makes no difference.
Regards, Shaun.
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Aug 01, 2013 6:39 pm
by maxkatz
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Aug 01, 2013 7:07 pm
by Shaun Summers
Thanks. I did look before hand but skipped over it somehow. Thanks.
How to map a distinct array of results from a column (field) to a list?
Posted: Sun Sep 01, 2013 9:34 pm
by bahar.wadia
I tried this. It does not appear to work with a dropdown list. Is this a bug or just the way REST works ?
I'll try the long way next.
Thanks
How to map a distinct array of results from a column (field) to a list?
Posted: Sun Sep 01, 2013 10:25 pm
by bahar.wadia
This works like a charm.
Thank you!
How to map a distinct array of results from a column (field) to a list?
Posted: Mon Sep 02, 2013 1:20 am
by bahar.wadia
I am trying to do the same. I have created the REST service, with a 'where' argument. I can test it and it works fine. However, when I use it in my application it returns an error. I have checked my string construction for the where argument and it is the same as the one I use for the Test.
What am I doing wrong ?
How to map a distinct array of results from a column (field) to a list?
Posted: Mon Sep 02, 2013 1:40 am
by Illya Stepanov
Please can you provide some screen shots how you call it from your app?
How to map a distinct array of results from a column (field) to a list?
Posted: Mon Sep 02, 2013 4:51 am
by bahar.wadia
Here are my results from the Test, so I know the query is working.
Below is the string that the app passes to the where parameter.
Below is the jqXHR error.
Hope this helps.
Thanks
How to map a distinct array of results from a column (field) to a list?
Posted: Mon Sep 02, 2013 9:49 am
by Anton Artyukh5836028
Hi,
You need to debug your code, I think this page can help. You need to check Network tab for request which your app sends. Or you can show us screenshot of that request -- Headers part with request body and response.