...
Code Block |
---|
<html><head><title>GetConditionExample</title><scripttype="text/javascript"> function conditionQueryJSON(){ return "[{\"action\":\"select\",\"invoke\":\"getConditionQuery\",\"parameters\":[{\"modulefields\": [ { \"module\":\"6\", \"fields\":\"CALREF2\"} ], \"filter\":\"\",\"isfromscreen\":\"yes\"} ] } ]"; } function getConditionQuery(row){ if (row[0]._6.CALREF2){ return "[ {\"action\":\"getcondition\",\"filter\":\"2.uid in (select childid from me_datarelation where parenttype=1 and childtype=2 and ( parentid="row[0]._6.CALREF2" or devicerowidparent="row[0]._6.CALREF2" ) ) \" } ]"; }else{ return "[ {\"action\":\"getcondition\",\"filter\":\"\" } ]"; } } function onErrorInvoke(rows){ if(rows.length > 0){ window.location="melt://showAlert:/"+ rows[0].message; } } </script></head><body></body></html> |
...