Mobile data collection data event issue with JS code

Hello,
New to the forum as well as scripting with JS is still on on-going battle for me. Running into an issue I have with an app I’ve developed on the Fulcrum Mobile data collection platform that gives the user the ability to script in work flows in the mobile form using a similar language to JS.
Heres the code:
ON(‘change’,‘sites_found’, function (event){
if(‘min_sites’>‘sites_found’){
SETVALUE(‘redo_required’, ‘yes’);
SETVALUE(‘inj_complete_date’, null);
SETSTATUS(‘more work required’);
SETVALUE(‘cot_coms’,‘Only ’ + $sites_found +’ injection sites located. Inject additional capsules to meet the required dosage’);
}
else if(‘sites_found’ >= ‘min_sites’){
SETVALUE(‘redo_required’, ‘no’);
SETVALUE(‘cot_coms’,"");
}
});
When I test the script on the mobile device, the number in the sites_found field does not trigger the event to fire in what either direction it should based on the value entered into that sites_found field.
Would really appreciate any advice on how to resolve this if someone could assist?
Thank you in advance!
MacKinnon

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.