rbf_SetFieldValue to null

Posted by smartsysISV on 12-Aug-2014 14:18

I'm trying to use rbf_setFieldValue to reset a dropdown-value.

I have tried:

rbf_setFieldValue("RXXXXXXXX",null)

rbf_setFieldValue("RXXXXXXXX",-1)

rbf_setFieldValue("RXXXXXXXX", 0)

Nothing is working!!!

How can i reset a dropdown (lookup-field)  in UI???

If I set a value og an existinglookup-record, this works fine.

Posted by pvorobie on 12-Aug-2014 15:05

Empty option for lookup field is empty string. So this should work:

rbf_setFieldValue("RXXXXXXXX", '');

All Replies

Posted by Gian Torralba on 12-Aug-2014 14:36

Hi Stein,

If you want the default value of the field dropdown to be selected in the page UI, you can use JQuery to achieve this. Please follow the sample code below

$("#RXXXXXX option:nth(0)").attr("selected","selected"); /*sets the first option as selected*/


Thanks,

Gian

Posted by pvorobie on 12-Aug-2014 15:05

Empty option for lookup field is empty string. So this should work:

rbf_setFieldValue("RXXXXXXXX", '');

Posted by smartsysISV on 12-Aug-2014 15:10

Thank you!!

This thread is closed