This might well be bloody obvious for you guys, but I just now figured out how to do a rtecall("count") from JavaScript.
Code:function getRecordCount(filename, query) {var dummy = new SCDatum(); var countResult = new SCDatum(); var rc = new SCDatum(); var flag = system.functions.rtecall("rinit", dummy, rc, filename); var flag = system.functions.rtecall("count", dummy, rc, query, countResult); return countResult.getText();} var r = getRecordCount("operator","name#\"F\""); print("there are "+r+" operators whose name begins with F"); r = getRecordCount("operator","true"); print("there is a total of "+r+" operators");


Reply With Quote


Bookmarks