I have a checkbox that I wish to bind to a boelean in one of my db collections. The checkbox is within a collapsible set that displays several records, so there are many instances of the checkbox on the page, each for a different record. See screenshot:
My where clause for my query service is: return '{ $and: [ { "prayee": "'+value+'" }, { "sender": "' + localStorage.getItem("userId") + '" } ] }';
The Before Send mapping for the service is as shown below:
When I test this service by invoking it from a button and checking the console, I see that the prayee parameter is being set to the default text for the my hidden label. I am expecting the query to be run several times, one for each prayee (user id from each instance of the hidden label). I have made sure to run my query service after the service that populates the hidden label.
How can I query the database using each user in my collapsible set as the prayee parameter (and the current logged-in user in a LSV as the sender parameter)?
Notes:
This query service queries a collection called Prayed, which has three columns, prayed (the boolean); sender and prayed, the last two of which are pointers to the users collection. Sender and Prayee are members of the same group in a GroupMember collection.
I started creating this app before models were introduced, so I am not using them in the app.