The Risk & Vulnerability Assessment | Service Referral and Upsert Service Referral forms in CommCare can be submitted without any new service referrals selected. When we receive a message with no service referrals selected, the job should gracefully exit and not attempt to upsert a referral.
The specific request, in as few words as possible
When we receive a message where form.subcase_0 is empty (i.e "subcase_0": ""), no referral should be upserted. The job should return the statement "No referral services to upsert."
See #17 and #2 for the original issues on these jobs. Currently the job as-is fails because it is trying to map undefined fields.
Background, context, and business value
The
Risk & Vulnerability Assessment | Service Referral
andUpsert Service Referral
forms in CommCare can be submitted without any new service referrals selected. When we receive a message with no service referrals selected, the job should gracefully exit and not attempt to upsert a referral.The specific request, in as few words as possible
When we receive a message where
form.subcase_0
is empty (i.e "subcase_0": ""), no referral should be upserted. The job should return the statement "No referral services to upsert."See #17 and #2 for the original issues on these jobs. Currently the job as-is fails because it is trying to map undefined fields.
state.json
https://www.openfn.org/projects/pd3yk4/messages/mk5awk4r
output.json
Test by rerunning this transaction: https://www.openfn.org/projects/pd3yk4/runs/rwap65an