Hi,
I'm building an app with nested lists (on separate pages). Each list needs to be a distinct list, restricted further by the items chosen in the earlier lists.
I can achieve a distinct list via the REST service but can't seem to get the "Where" clause working - either with a defined value or a local storage variable. It works when testing the service but not with mapping. I assume the answer lies with JavaScript but I can't figure it out.
My DB collection has the fields, OriginPort, DestinationPort, CntrType, Rate.
Here is the process flow:
1) I list distinct OriginPort.
2) The user clicks an item on the list and a local storage variable, originVB, is created.
3) Navigate to next page/list where I list distinct DestinationPort where OriginPort = originVB. This is where it fails and nothing is listed.
The local storage variable is definitely being set. The JS console in Chrome is showing "400 Bad Request".
I'm using the following JS in the "Where" request parameter:
var value1 = localStorage.getItem('originVB');
return '{"OriginPort":"'+value1+'"}';
Please help!