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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / To add and delete the ...
Power Apps
Unanswered

To add and delete the Values from a choice column of a dataverse table through Power App

(0) ShareShare
ReportReport
Posted on by 70

Hi,

I have a Dataverse table where I have a choice column and some values (choices) for it. I am displaying this in a combo box in the power app. Now, I am looking for an option where I can Delete the Values of the Choice Column from the power apps itself. In short, I want to  Delete the Choices from the Power Apps without doing anything with the Dataverse table.

 

Please could anyone help me on this ?

Thanks.

 

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Saideep - a Choice column returns a single column Table.

     

    I think what you mean is that you want to Filter out a specific Choice from a Dataverse Choice table, rather than Delete a Choice from the Choice table (whether it is a Global Choice or Local Choice).

     

    Note the syntax for the Choice column name is dependant on whether your Choice column is a Local or Global Choice. You can quickly obtain the syntax by simply adding an Edit Form control into your App with the Choice column added as a DataCard, then click into the Items property of the automatically generated Combo Box control to obtain the Choice name.

     

    For a Combo Box control, you can use:

     

    ShowColumns(
     Filter(
     AddColumns(
     Choices('Your Choice Column'),
     "_Text",
     Text(Value)
     ),
     Not('Your Choice Column'.'Your Choice You Want To Remove' in _Text)
     ),
     "Value"
    )

     

    For a Dropdown control, the syntax is much simpler:

     

    Filter(
     Choices('Your Choice Column'),
     Value <> 'Your Choice Column'.'Your Choice You Want To Remove'
    )

     

  • Saideep Profile Picture
    70 on at

    Hi @Amik ,

    For the combo box Items property logic, I used the syntax you gave but in the Not() function, I have to put the Static Choice value that I want to remove, can I have a dynamic way of doing that because I do not want to hardcode the value in the logic because there might be multiple times that I want to remove/filter different choices. I am looking for something like, out of all the choice values that I have I want to remove/filter the choice and display the remaining choices in the combo box. Can we do something like that ?

     

    Thanks

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Saideep - you can certainly make this dynamic, but you will you need clarify what mechanism or business rule you want to use for doing it.

     

    For example, you can load a separate list into your data source with Choices you want exclude, or create a separate control somewhere in your app which you can use to select which Choices to include or exclude (e.g. a  Gallery Checkbox).

     

    Give this some thought and then I'll share some suggested code.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard