How to extract code of Picklist values?

Posted by shilpi.agarwal3373 on 05-Feb-2016 06:13

Hi all,

Following is the script component-

function customizeEdit() {
   var sectionID = rbf_getSectionIdByTitle("Membership Info");    // This works fine
   var code = rbf_getPicklistCode("Membership");
  alert(code);                                                                                      // I am getting null
   rbf_showOrHideSection(sectionID , code=="YES");

Here "Membership" is the integration name of picklist which contain 2 values Not a Member and Club Memebr.

Plesae suggest.

All Replies

Posted by Shiva Duriseati on 05-Feb-2016 06:29

Hi Shilpi,

Please configure codes in the "picklist" field using pipe "|" symbol.

Ex: Assume you have four values in "Membership" picklist as below:





When var code=rbf_getPicklistCode("Membership") is used ,then code is returned based on the selection from picklist.

If you select "Ä" from pick list  it will return null(Since we haven't configured any code to A). When you select "B" it will return "b"

Hope this clarifies.



This thread is closed