Hide old field values from choice list. Old choice values should still be visible in incidents

Angie15
Tera Contributor

There is a field XYZ in incident form. I need to hide old choices from the choice list selection and  new values should be available as choice list. The old values should still be present for the incidents in which those values were already selected. Could someone please provide any views on how to do that or scripting.

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Hi @Angie15 

 

in the sys_choice table there is a field "Inactive". You can set such values you want to hide to "true":

 

MaikSkoddow_0-1701834712368.png

 

Maik

Setting 'inactive' true is just setting all the old selected values to blank . I need to keep the old values hidden not completely inactive for audit and make it unavailable for chocie selection for new incidents but those values should be present in list view of incidents or old incidents where they were selected.

I am using onLoad client script:

if(g_form.isNewRecord()){

g_form.removeOption(<fieldName>, <choiceValue>);

}

This is showing old values in list view and form. But I need to hide these old values in new incident as available selection choice for user which is not happening. Any suggestion?