Hey there folks,
I’m using Rapid Pro and I am facing a blocker on how to loop over results to perform an action for each of the results.
The options I see in Rapid pro are mainly if..else
In my situation, when a supervisor submits a form, I want to send a message to all CHWs under the Supervisor’s area and notify them about the upcoming event.
I’m using Rapid Pro to get the phone numbers of the CHWs. I’ve been able to do that and the result is like
{"total_rows":11,"offset":9,"rows":[
{"id":"6c55fa2c-fbf6-4e1f-b2ea-cf9ae52046cb","key":"fd39b216-a15a-4b06-a631-43fe504d6c91","value":"0781819189"},
{"id":"cf3d0f4f-ed57-43ff-bdb9-d88522f35f20","key":"fd39b216-a15a-4b06-a631-43fe504d6c91","value":"0718345346"}
]}
The challenge I now face is how to send a message to each number in the result? My plan is to send a report back to CHT via the API for each of the number / contact.
But I haven’t found any resource that describes looping the results in Rapid Pro.
Might anyone in the community have come across a similar use case that could unblock me.