Forum Post: RE: Query to return values in a picklist as an array?

  • Thread starter Thread starter Godfrey Sorita
  • Start date Start date
Status
Not open for further replies.
G

Godfrey Sorita

Guest
Hi Greg, You can use the code below to get all the option values in a picklist: script src='../js/metadata.js' type='text/javascript' charset='utf-8' /script script var arrName = [], count = 0; $(function() { rbf_getFieldDef("object_a", "my_picklist", function(data){ //get the field definition of "mypicklist" field alert(data); $(data).find('ListItem').each(function(){ //Loop all "ListItem" Nodes arrName[count] = $(this).attr('Name'); count++; }); alert(arrName); //Debug }); }); /script Note: Please change the integration names and paste the code on a script component. Regards, Godfrey

Continue reading...
 
Status
Not open for further replies.
Back
Top