Hi @mrjones ,
I’ve tried using a truthy value but for reason . It is not working. below id the complete code and the error as well.
The task code snippet:
const {getField } = require(‘./contact-summary-extras’);
module.exports = [
{
name: ‘htn.linkage’,
title: ‘task.htn_followup’,
appliesTo: ‘reports’,
appliesToType: [‘reach_htn’],
appliesIf: function (contact, report) {
return getField(report, 'eligible_shtn');
},
actions:[{form: 'care_htn'}],
events: [{
id: 'htn-followup',
days:7,
start:2,
end:2
}]
}
];
The Error
Error getting tasks for all contacts Error: Invalid rule definition
Unable to match { in { when { c: Contact } then { !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){‘undefined’!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:‘Module’}),Object.defineProperty(e,‘__esModule’,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&‘object’==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,‘default’,{enumerable:!0,value:e}),2&t&&‘string’!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,‘a’,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=‘’,n(n.s=1)}([function(e,…