Page 1 of 1

Source localStorage variable in db list service request "where" parameter

Posted: Wed Mar 12, 2014 6:13 pm
by Mike Maughan

I'm trying to do what the gentleman did in this thread, however I'm going to need some smaller steps than what he showed in his solution.

Basically, I want to return only rows in a table that have a specific column value. I've created the "where" request parameter, and I'm trying to tell it to use the localStorage variable value, like this:
where={"incident_id": Appery('currentIncident') }

Any suggestions would help immensly. I've search all over the documentation and I don't see any simplified steps to accomplish this.

Thanks!

Mike


Source localStorage variable in db list service request "where" parameter

Posted: Wed Mar 12, 2014 6:14 pm
by Mike Maughan

Sorry - here is the referenced thread:

https://getsatisfaction.com/apperyio/...


Source localStorage variable in db list service request "where" parameter

Posted: Wed Mar 12, 2014 6:43 pm
by Nikita

Hello,

Please add JS to the mapping to where parameter:
return '{"incident_id" : "' + Appery("currentIncident") '"}';


Source localStorage variable in db list service request "where" parameter

Posted: Wed Mar 12, 2014 8:17 pm
by Mike Maughan

Thanks!