0

I have a SharePoint list which has a choice filed. Choices are A, B, C.

Is there anyway I can hide B from the users. I don't want to delete the B option I just want to hide it from users.

Regards

1
  • Which version of SharePoint you are using? Do you have access to content editor/script editor webpart? Do you want to hide this from all users or based on permissions? Oct 23, 2020 at 5:29

1 Answer 1

0

If you have access to Content Editor/Script Editor webpart then you can use JavaScript code, something like:

<script src="https://code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready( function() {
       //Hide all options
       $(":input[title^='Choice Column Name']").find("option").hide();

       //Only show selective options
       $(":input[title^='Choice Column Name']").find("option[value='A']").show();
       $(":input[title^='Choice Column Name']").find("option[value='C']").show();

       //OR --> Only hide selective options
       $(":input[title^='Choice Column Name']").find("option[value='B']").hide();
    });
</script>

Reference: How to hide certain choice values from appearing in a sharepoint list drop-down?

If you are using SharePoint online then you can customize list for using Power Apps. You can set source items of your choice field to something like:

ClearCollect(colDropDownOptions, Filter(Choices('DataSource'.ColumnOptions), Not(Value = "B")))

Reference: How to hide an option in drop down with SharePointIntegration?

1
  • Hi @Harris, does this answers your question? If yes, please Upvote(^) and accept as an Answer as it helped you & it will help others with similar question in future to find the correct answer easily. It also removes this question from "Unanswered questions" list. May 14, 2021 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.