Thanks Everett.
I've been able to get most of the way there using some IOL and modifying some of Dan's code
I basically want to count how many records in the table with the same first name (Field 11) and last name (Field 10) as my current record and input this into field 14. The problem is, the way I've written it, it only executes on the add record initiation, at which point there is no first or last name. Any recommendation on how to modify this to execute on record save?
(function(){
var querystring=document.location.search;
if (/nwr/i.test(querystring)) {
//ADD RECORD PAGE ========================================
var dbid = "XXXXXX";
var apptoken = "";
$.ajaxSetup({data: {apptoken: apptoken}});
var promise = $.get(dbid, {
act: "API_DoQueryCount",
query: '{11.CT._fid_11.value}AND{10.CT.Smith}',
clist:"11"
}).then(function(xml) {
console.dirxml(xml);
var numwithSameName = $("numMatches", xml).text();
console.log(numwithSameName);
_fid_14.value =numwithSameName;
});
}
})();
------------------------------
Jessica Feauto
------------------------------