How can i hide field choice option in List page?

Ankit Kumar6
Tera Contributor
 
4 REPLIES 4

Community Alums
Not applicable

Hi @Ankit Kumar6 ,

I don't think you can hide, even if you use OnCellEdit client script or ACLs.

 

dgarad
Giga Sage

HI @Ankit Kumar6 

Create OnCellEdit Client Script:

select field - State

script:

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;

//In Place of "3" add your choice value


if ((newValue == 3) && (g_user.hasRole('admin'))) {
saveAndClose = true; // allow to select choice

} else {
alert('Only admin can select this choice');
saveAndClose = false; // donot allow to select choice
}

callback(saveAndClose);
}

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Ankit Kumar6 What do you mean List Page? Brief more about your issue? 

Some screenshots would be great to understand your issue? 

 

You can remove field choice option using below syntax in Client Script

g_form.removeOption('Fieldname', 'choiceValue');

Service_RNow
Mega Sage

Hi @Ankit Kumar6 

Please follow this thread it will helpful to you

Removing or Disabling Choice List Options 

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!