Hi there
I am removing and adding values to a user lookup (picklist) based on certain criteria. On changing of a field I am trying to rebuild the full user picklist to then refilter (remove values) out. I am using the following:
function cb(divVal)
{
/*$('#accountManager').find('option')
.remove()
.end()
;*/
alert(divVal);
for(var i=0; i<divVal.length; i++)
{
var divAcctMgrId = divVal[0][0];
var divAcctMgrName = divVal[0][1];
$('#accountManager').append("<option value=" + divAcctMgrId + ">" + divAcctMgrName + " | Test</option>");
}
}
rbf_selectQuery("select id, name from USER", 50, cb)
The alert brings up the following:
"First Admin,Second Admin,Hosny Ansar,Phil Smith,Byron Branfield,Iram Khan,Kevin Palmer,Meryem Kesmi,Adrian Young,Jon Starkey"
I also get the following error:
The error comes because the where criteria should be in quotes. (say something like this : select id, name from USER where id='Jon Starkey'). But, since you are saying the alert brings up the right results, I dont think the error comes from the selectQuery call you have pasted here. May be there is some other query that gets fired with an incorrect query.
Modification of control on UI page will not modify field's options stored in DB. What you're trying to achieve?