Set value of "Select" field from custom script

Is it possible to set the value of a select type field with a custom script?

This seems to work for other field types, but not on select fields:

cur_frm.set_value('fieldname') == 'value'

and yes, ‘value’ is equal to one of the values set in the select field.

Thanks for any help!

Hi @Dbone,

yes,

try using, frm.set_value('fieldname', value)

Thanks, Makarand

1 Like

This set_value code works perfectly for all the field types I’ve tried, including select fields. Thank you!