I have simplified the complete problem into a 2 question survey
I have tested an array of syntax and logic and simplified it as much as possible but nothing seems to work
I have set the 'bind::esri:parameters' to AUTO but even it stops working
All calculations that parse eventually fail when the user changes Q1 to Yes and Q2 to No, then Q2 to No and finally Q1 back to No
Q2 JSON will always yield 1 which is invalid. "If the Tap is NOT ON, Water cannot Flow"
The calculations only work for so long before they fail.
It is for this reason I only see a javascript solution
Considering the complexity of some JS examples this issue should not be too complex for someone that understands esri's implementation of JS and referencing of controls and controlling execution order
These PARSE
if(${TapOn}='0','0','')
if(${TapOn}='0','0','0')
if(selected(${TapOn}, '0'), '0', '0')
if(selected(${TapOn}, '0'), '0', '')
if(selected(${TapOn}, '1'), 0, '')
if(string-length(${TapOn})>0,'1', '0')
if(string-length(${TapOn})>0,1,0)
These Do Not PARSE
if(selected(${TapOn}, '0') and selected(${TapFlowing}, '1'), 0, 1)
if(selected(${TapOn}, '0') and selected(${TapFlowing}, '1'), '0', '1')
if(selected(${TapOn}, 0) and selected(${TapFlowing}, 1), '0', '1')
if((selected(${TapOn},'0'),int(${TapFlowing}),0))
if((selected(${TapOn},0),int(${TapFlowing}),0))
if((selected(${TapOn},0),int(${TapFlowing}='0'),0))
if(${TapOn}=0,and ${TapFlowing}=1),"0")
if(${TapOn}=0,and ${TapFlowing}=1),'0')
if(${TapOn}=0,and ${TapFlowing}=1),0)
if(${TapOn}='0',and ${TapFlowing}='1'),0)
if(${TapOn}='0',and ${TapFlowing}='1'),'0')
if(selected(${TapOn}, '0'), '0')
if(selected(${TapOn}, 0), '0')
if(selected(${TapOn}, '0'), 0)
if(selected(${TapOn}, 0), 0)
if(${TapOn}= '0'), 1, 0)
if(${TapOn}= 0), 1, 0)
if(${TapOn}= 0), '1', '0')
Hopefully someone knows how to get this working!