I have a Html choice field on widget and values are shown incorrect

Priya75
Tera Contributor

I have a Html choice field on widget and choices in client controller , and also a onchange function on this field. 

c.host;

when i am using console the value is not getting displayed correctly. it shows previous values. how can i correct it.

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Priya75 

 

Share some screen shot pelase

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

‹div class="col-md-3">
‹div class="Form-group"›
«span ng-if="c.non_it_fields==false || c.sub_div_non_it_fields==false" title="Mandatory" class="fa fa-asterisk mandatory" ng-class="('mandatory-filled': c.hostloc != **
‹ /label
«sn-choice-list sn-model="c.hostloc" sn-options="c.choicelistoption"
5n-value-field="value" sn-text-field="labe2"
sn-items= "c.hostloc_options"
sn-on-change="c.getHostloc();c.formapp?)">c/sn-choice-list>
</div>
</div>

Priya75
Tera Contributor
c. hostloc_options = [{
label: ' ',
value: ' '
}];
c.hostloc = ' ';
c.hostloc_options = [{
Label: *choice1',
 value: 'choice1'
},
label: 'choice2',
value 'choice2'
},
label: 'choice3'
Value: 'choice3'
},
Label: 'choice4',
value: 'choice4'
},
];