Why choice options are not visible under a field when Saving the record in draft?

Ankita Kolhe
Tera Contributor

Hi Community,

 

I'm experiencing weird behaviour of a choice type field. The field choice options disappears when user clicks on 'Save as draft' .Otherwise, the options are visible everytime.

 

Before clicking on 'Save as Draft' UI Action:

AnkitaKolhe_1-1745992376537.png

 

Before clicking on 'Save as Draft' UI Action:

AnkitaKolhe_0-1745992281801.png

 

Save as Draft UI Action:

AnkitaKolhe_2-1745992452762.png

 

Please note that there is no scripting controlling the choice options of this field.

Can anybody please help what could be the iissue?

 

Thanks,

Ankita

 

1 ACCEPTED SOLUTION

@Ankita Kolhe 

I could see that it's a list type field and is it bringing in choices from some table's field?

What happens when you manually save without the button?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Community Alums
Not applicable

Hi @Ankita Kolhe ,

 

he issue could be due to how the server-side update (current.update()) is being handled before the client-side rendering of the form is complete. This might be causing the client-side to miss out on updating the choice field with its dropdown options when the page reloads.

 

 

 

  • Use the GlideForm (g_form) methods to refresh the field on the client side after the form reloads.

  • You could try setting the field’s options manually after the form reload, using g_form.setValue() to reset the choice value.

After the form reload, try using a g_form method such as g_form.clearOptions() followed by g_form.addOption() to re-populate the dropdown list options explicitly on the client side.

 

 

Check for any UI Policies or Client Scripts that may be dynamically manipulating this field or its options based on the record’s state.

Disable these scripts temporarily and check if the issue persists.

 

 

AbinC
Tera Contributor

Hi @Ankita Kolhe ,

 

Solution:
Based on the dictionary Entry the field was created on the cmdb_ci_pc_hardware table but the choice list specification table was configured on the alm_hardware table:

AbinC_0-1745994223997.png

 

 

Therefore all that was required was to go to the alm_hardware choices table and then I had to add the choice there:

AbinC_1-1745994224035.png

 

EX:

AbinC_2-1745994224007.png

 

please do accept this solution if you have found out helpful as this helps me to stay active in this platform and grow accordingly 

 

THanks,

Abin chacko. 

Ankur Bawiskar
Tera Patron
Tera Patron

@Ankita Kolhe 

any business rule is clearing that field since your UI action is updating the state value on that record?

Is that choice field a custom one or OOTB one?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankita Kolhe 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader