S
Shiva Duriseati
Guest
Hi Greg, "callback" function is something which is called after the query part executes completely and you cannot pass a value which keeps changing(in this case "fieldnumber"). But for the values which remains constant can be used by defining function in the query itself as follows.(Taking your own example) rbf_selectValue("SELECT field" + fieldNumber + "InUse FROM objectA WHERE id = 123456", function(checkbox) { var arr1 = [checkbox, fieldNumber]; return arr1; }); "checkbox" is an array of resultset of selectquery and fieldnumber will be "4"( since by the time callback is called query part executed completely without calling callback function.) So there will be no continuous call to callback function. Lets take other example where a parameter remains unchanged and the same param want to be passed to callback function along with array. var idValue="{!id}"; rbf_selectValue("SELECT name FROM Object_A where id="+idValue, function(arr){ //idValue can be used here }); Please let me know if you any other queries. Regards, Shiva
Continue reading...
Continue reading...