Gender Selection

Hi everyone,

I want to auto fetch the gender while selecting Salutation on the employee.

I tried this code

salutation: function() {

if (this.frm.doc.salutation) {
this.frm.set_value(“gender”, {
“Mr”: “Male”,
“Miss”: “Female”
} [this.frm.doc.salutation]);
}
},

But not works please help me with this.