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 :
Power Platform Community / Forums / Power Apps / Global Choice Field : ...
Power Apps
Suggested Answer

Global Choice Field : - What is this Hidden checkbox?

(0) ShareShare
ReportReport
Posted on by 28
Hi,
 
I have created a global choice field and added few values in there. I noticed that there is a "hidden" checkbox when I navigate to additional properties thinking that it would hide that particular value from the UI. But this value is not hidden in the model driven app UI and I can still see the "Not in use" value there. 
 
I have published the entire solution and the choice field but no luck. Can anyone tell what is the usage of this hidden checkbox against a value?
 
Also, I don't want to delete the option value as this will remove the legacy values as well from the records.
 
 
 
 
Thanks,
Nitin
Categories:
I have the same question (0)
  • Ravindra Jadhav Profile Picture
    342 Moderator on at
    if you can unhide that and then removed it, then it will not display in model driven app
     
     
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • nitingupta4u Profile Picture
    28 on at
    Hi Ravindra,
     
    I don't want to delete the option as this will remove the legacy values as well from the records.
     
    Nitin
  • satya_vijay_2025 Profile Picture
    76 on at
    @nitingupta4u

    I m not sure why the hide Option is not working out of Box.

    However you could do the same with JS. 

    STEP 1 :Create JS file in the local machine 
     
    function removeOptionFromGlobalOptionSet(executionContext) {
        var formContext = executionContext.getFormContext();
        var fieldName = "cr682_choose";
        var optionToRemoveValue = "Test3";
        var fieldControl = formContext.getControl(fieldName);
        var field = formContext.getAttribute(fieldName);
        
        if (field) {
            var options = field.getOptions();
            var option = options.find(opt => opt.text === optionToRemoveValue);
            
            if (option) {
                fieldControl.removeOption(option.value);
            }
        }
    }
    

    Code explanation 
    • Identify Field and Option: Defines the field's logical name and the option value ("Test3") to remove.
    • Find the Option: Retrieves the options of the field and searches for the option with a matching text.
    • Remove Option: If the option is found, it removes it from the option set using removeOption.

    STEP 2:  Add the JS to Web Resource 
    • Navigate to Solutions 
    • Click New > Web Resource.
    • Name it (e.g., removeOptionWebResource), select JavaScript as the type, and upload your .js file.
    • Save and publish the web resource.
       
    STEP 3 : Add to the intended Form
    • Navigate to the intended table
    • Open the Forms section for that Table
    • Select the form you want to modify.
    • Under the Form Libraries section, click Add.
    • Select the JavaScript Web Resource (e.g., removeOptionWebResource).
    • Click Add to attach the web resource to the form.
     
    STEP 4:  Add the JS to Onload 
    • In the Form Properties, go to the Event Handlers tab.
    • Under Form Libraries, select the added JavaScript web resource.
    • In the Event section, choose OnLoad.
    • In the Function Name field, enter removeOptionFromGlobalOptionSet.
    • Ensure the Enabled checkbox is selected.
    • Click OK and then Save and Publish the form.


    OUTPUT : 



    If you would like to remove more than 1 options 
    function removeOptionFromGlobalOptionSet(executionContext) {
        var formContext = executionContext.getFormContext();
        var fieldName = "cr682_choose";
        var optionsToRemove = ["Test3", "Test4", "Test5"];  // Array of options to remove
        var fieldControl = formContext.getControl(fieldName);
        var field = formContext.getAttribute(fieldName);
    
        if (field) {
            var options = field.getOptions();
            
            // Loop through each option to remove
            optionsToRemove.forEach(function(optionToRemoveValue) {
                var option = options.find(opt => opt.text === optionToRemoveValue);
                
                if (option) {
                    fieldControl.removeOption(option.value);
                }
            });
        }
    }
    

     
    ​​​​​​​ Sathyamoorthy Vijayakumar | LinkedIn
  • nitingupta4u Profile Picture
    28 on at
     
    I understand that we can hide the values with a JavaScript function, but I just want to understand what the usage of this hidden checkbox against the value in choice field.
     
    Thanks,
    Nitin
  • Suggested answer
    LindsayGG Profile Picture
    2 on at
    Hi Nitin,
     
    Like you I hoped this new "Hidden" property would save me some JScript, but that is not the intention.  Saw this thread on LinkedIn a few days ago (https://www.linkedin.com/posts/maheshghori_dynamics365-dataverse-configuration-activity-7305710594077118465-onzr) and it included this nice explanation:
     
     
     
    All that said, this appears to work for form-level hiding in this excellent video: https://www.youtube.com/watch?v=I_MrwoDNFHE but I didn't (yet) have any success getting this to work in my own environment.
     
    Hope it helps,
    Lindsay.
  • urklnme Profile Picture
    168 on at
    WHAT?!?! A MICROSOFT FEATURE WITH NO DOCUMENTATION TO EXPLAIN ITS USAGE?  I AM SHOCKED!!  :D
     
    OOPS
     

    Choice hidden property limitations

    • The choice column hidden property is only applicable for model-driven apps. Other components that use Microsoft Dataverse tables, such as canvas apps, don't use the choice column hidden property.
    • The choice column hidden property only works for app with the modern, refreshed look for model-driven apps enabled.
    • The choice column hidden property isn't currently supported for multi-select choices even when the Selecting multiple choices is allowed option is selected.
    • The hidden property only hides the option label and value when displayed in a model-driven app. Even when hidden, choice labels and values can be viewed and set by accessing the Dataverse table directly, such as from make.powerapps.com. Hidden options can also be set using the setValue client API method.
     
     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard