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 / Remove specific value ...
Power Apps
Answered

Remove specific value from Combo box

(0) ShareShare
ReportReport
Posted on by 559

Hi All,

I have a form which list all the details from a SharePoint. I have a text input field which loads the selected Id from gallery. I have a field called Action on RPC which when selected only as duplicate a combo box will be loaded with all the RPC Id's from the SharePoint list. I have two requirement now to be combined For eg.  when the  text input field has Id as 7(which will load from the gallery automatically when selected) the combo box should omit the selected Id and should list the other ID values and for eg. ( If there are two IDs 3 and 4 which is saved as duplicate that Id's also should not be listed in the  combo box.). Both of this should work in the same combo box. Is there any way to implement both the requirements in the same combo box. Any suggestions or help on this.

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Uthhra,

    Do you want to remove the selected ID from the ComboBox and also remove the duplicated IDs from the ComboBox?

     

    Set the Items property of the ComboBox as below:

    Filter(AddColumns(GroupBy(List,"ID","IDG"),"Duplicated",If(CountRows(IDG)>1,"Repeated","Single")),Duplicated="Single"&&Rating<>Gallery.Selected.ID)
  • Sri Profile Picture
    559 on at

    Hi @v-qiaqi-msft 

    Yeah. But what is this ID, IDG, Duplicated?

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Uthhra,

    ID is the column I populate the Combobox with, IDG is the group name in GroupBy() function, Duplicated is a column I used in AddColumns() to mark if there is duplicated items in ComboBox.

     

    You have mentioned ID in your post, just replace it with the column that you populate the ComboBox with.

  • Sri Profile Picture
    559 on at

    Hi @v-qiaqi-msft ,

    I replace my column name here and got an error stating column name doesn't exists. what is this Repeated, Single, Rating. I am getting an error stating Group by has invalid arguments.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Uthhra,

    This means that the data source including this column is not connected to your app.

     

    Here is the thing, in my sceanrio, I populate the ComboBox with ID column(including duplicated ids in this column). And the Gallery is populated with the same list that the ID column exists in, once I select a record from the Gallery, the TextInput will display the selected ID from Gallery. When it comes to the ComboBox, it will remove the gallery selected id and some duplicated ids. Like that I have selected id 7 from Gallery, and the ComboBox has items like 1,2,3,3,4,4,5,6,7, it will only display 1,2,5,6 in the ComboBox.

  • Sri Profile Picture
    559 on at

    Hi @v-qiaqi-msft ,

    I gave the items property of combo box with above code and instead of displaying the ID's its displaying the text in quotes as Single.

  • Sri Profile Picture
    559 on at

    @v-qiaqi-msft ,In case of my scenario For eg if ID 3 is selected it will omit the 3 ID and display as 1,2,4 and other scenario is compared with a column called "Action on RPC" If the column has a value saved as duplicate for 1 & 2 ID's then the combo box should omit these two also and should list only ID 4 (the remaining one).

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Uthhra,

    Ohhh, so we need to compare the ID in "Action on RPC" with the ID in ComboBox.

    Okay, let's do something fine-tuning:

    Filter(ComboBoxData,ID<>Gallery.Selected.ID&&!(ID in AnotherDataSource.'Action on RPC'))

    Here I am not sure if the 'Action on RPC' shares the same data source with the ID field, generally, they belong to different data soruce so that we need to compare them.

    Note that ComboBoxData is the original formula you want to set, like List1.ID. Or you could replace it with the data source where includes the ID, and select the ID field as the displayt field in the Edit pane of the ComboBox settings.

  • Sri Profile Picture
    559 on at

    @v-qiaqi-msft ,

    Action on RPC and I'd both are in the same data source (SharePoint). I need to compare the "Action on RPC" column only for those ID's whose value is saved as Duplicate. The combobox filtering should be based on two things: one is the gallery selected ID should not be listed in Combobox and the other is when Action on RPC has Duplicate for any ID's that also should not be listed. Because in some cases, duplicate will not be there and sometimes it will be there. Based on that the filtering should be done in Combobox.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Uthhra,

    Well, could you please try the formula I provided?

    Just, remove the AnotherDataSource parameter:

    Filter(ComboBoxData,ID<>Gallery.Selected.ID&&!(ID in 'Action on RPC'))

     

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
Kalathiya Profile Picture

Kalathiya 419

#2
WarrenBelz Profile Picture

WarrenBelz 397 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 345 Super User 2025 Season 2

Last 30 days Overall leaderboard