Get value of sn-choice-list in server script in widget

SD35
Tera Expert

I have a sn-choice-list as such:

Which shows me list of countries.

<sn-choice-list sn-model="c.cmp_country" id="cmp_country" name="cmp_country" placeholder="${Company Country}" field="country" sn-options="data.cnt" sn-value-field="value" sn-text-field="label" sn-items="data.cnt" page-size="10" required></sn-choice-list>

How to i fetch the value selected in server script ?

1 ACCEPTED SOLUTION

Change it as below, and add ".toString()" while getting the value from a GlideRecord [cnt.sys_id.toString()].

 

find_real_file.png

View solution in original post

12 REPLIES 12

Now the list is populating but:

Are you getting the country value in gs.addInfoMessage(input.country) ?

I am getting object object

Now this is working! Thanks a lot for your help!

No probelm.

If this has solved the issue please mark the reply as Correct.