Triggering a CommCare SMS reminder every time a form is filled

commcare

I want to trigger an immediate CommCare SMS reminder every time a particular question is answered in a form. If I set case property trigger = "OK", it will be triggered the first time I fill that form for a particular case. Will it be triggered the second time I fill it for the same case (since I'm not actually changing the value of that case property)?

Best Answer

The reminder alert will not be triggered the second time since the value of the case property is not changing.

One way to handle this use case is to use two values (such as 1 and 2) for the case property "trigger", having the form alternate between changing it from 1 to 2 and 2 to 1 each time you require a new alert to be sent.

Then you can have two reminders with exactly the same content, only one sends when trigger = 1 and the other sends when trigger = 2.

It's important to note that if the form data is being collected on mobile, frequent syncs are important for this to work properly. For example, if the form gets filled out twice, changing trigger from 1 to 2 and then 2 to 1, and only then a sync happens, the no new alerts will send.