web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

What does the 'Hidden' checkbox to in the Option Set "Additional Properties" section?

(6) ShareShare
ReportReport
Posted on by 18
Working on hiding older options that are no longer used within an Option Set (Choice) field. Typically I'd use just another webresource/Javascript to hide older options, but recently noticed that in the Additional Properties area for each choice, there's a checkbox called Hidden.

Does anyone have any insight as to what this does? At first, I was praising Microsoft for finally adding an easy way to hide a choice within an Option Set field without using JS, but after checking it, publishing, etc., I realized those "hidden" choices still appear on the form. 
 
Any insight would be helpful, thank you!
 
I have the same question (0)
  • Daivat Vartak (v-9davar) Profile Picture
    7,847 Moderator on at
    Hello snoek,
     

    You've discovered the "Hidden" checkbox within the Option Set (Choice) field's additional properties, and you're right to question its functionality. It's not immediately obvious how this checkbox works, and it doesn't behave as many would expect.

    Here's the insight you're looking for:

    The "Hidden" Checkbox and Its Purpose:

    • Not for Form-Level Hiding: The "Hidden" checkbox does not hide the option from the form's dropdown or lookup controls. It does not control the options that users can select.

    • Purpose: The "Hidden" checkbox is primarily intended for use in model-driven app views and charts.

      • When you mark an option as "Hidden," it will be excluded from the values displayed in views and charts that use the Option Set field.

      • This is to help clean up and simplify data visualizations by removing irrelevant or obsolete options. 

    • Why It Doesn't Hide on Forms:

      • The design philosophy behind this is likely to maintain data integrity.

      • Hiding options on forms could lead to inconsistencies if existing records still have those values assigned.

      • It is more about cleaning up the display of data, and not about restricting data entry. 


    •  

    Why Your JavaScript Approach Remains Relevant:

    • Form-Level Hiding: If you need to hide options from the dropdown or lookup controls on forms, JavaScript is still the most reliable and supported method.

    • Dynamic Hiding: JavaScript allows you to dynamically hide options based on specific conditions, which is not possible with the "Hidden" checkbox.


    •  

    JavaScript Approach (Refresher):

    If you are unfamiliar, here is a quick overview of how to hide options using Javascript.

    1. Get the Control:

      • Use formContext.getControl("your_optionset_field") to get the Option Set control. 

    2. Remove Options:

      • Use removeOption(value) to remove specific options from the control.

      • value is the integer value of the option you want to remove. 

    3. Example:
    function hideOptions(executionContext) {
    var formContext = executionContext.getFormContext();
    var optionsetControl = formContext.getControl("your_optionset_field");

    if (optionsetControl) {
    optionsetControl.removeOption(1); // Remove option with value 1
    optionsetControl.removeOption(3); // Remove option with value 3
    }
    }

    Key Takeaways:

    • The "Hidden" checkbox is for views and charts, not forms.

    • JavaScript is still the method for form-level hiding of Option Set options.

    • When hiding options, be aware of existing data and potential inconsistencies.

    I hope this clarifies the purpose of the "Hidden" checkbox and confirms that your JavaScript approach is still essential for form-level control.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Verified answer
    ttangelder Profile Picture
    20 on at
    I also stumbled across this option today. Either Microsoft changed something in the last three weeks, or I am experiencing other behavior.
    For me it does work like I expect and that's different behavior than you experienced.

    It does hide the option when you create new records, or try to change an option, other than the hidden option, on an existing record. So this hides it for future records.
    And when the hidden option was selected on a older record, and you open that record, you do see the old value. This leaves old data intact. You can decide off course to "migrate" to another option set value. However, if you do that for all records, you can just as well delete the option value and not hide it.
     
    You can also still see the old value in views and can export it.
     
    This seems to work fine to hide options completely. 
    Like Daivat mentions, to hide options conditionally, JavaScript is still needed.
     
    In screenshots:
    Record with old option selected, before hiding:
     
     
    That same record after hiding. Greyed out. I can switch to any other option, but cannot switch back to the greyed-out option.
     
     
    After saving and refreshing, the old hidden option is also no longer visible:
     
     
    So for me that works as I expect: hide old options, but keep those options on old records for history purposes. 
     
     
    Cheers,
    Toby
  • SW-18031443-0 Profile Picture
    2 on at
    Hi,
     
    Is anyone else having an issue with this? We've tried to use the 'Hidden' tick box to hide an option on an option set (as suggested in multiple youtube videos) in hope that it will hide the option for users but with no luck!
     
    Reading the above seems to be conflicting to what the videos are saying is anyone able to confirm for sure which is right?
     
    Thanks!
     
    Simon

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 119

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 89 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 89

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans