Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to exclude a value that already exists in another ComboBox from a ComboBox

(0) ShareShare
ReportReport
Posted on by 100


Hi,


I wonder how to exclude a value that already exists in a ComboBox in another ComboBox. I fetch and return the value from a SharePoint List

SharePoint List Structure

vicsaisan_2-1712047820809.png

 



Combo Box A already have e.g  'FFMC-Ops'

 

formula: 

If(!IsBlank(TextInput1.Text), Distinct('Folders',Title))

 

vicsaisan_0-1712047386949.png

 

Combo Box B should only have FFMC-Test since the FFMC-OPS is already selected in Combo Box A

vicsaisan_1-1712047513961.png

 





 

  • floxfloat Profile Picture
    100 on at
    Re: How to exclude a value that already exists in another ComboBox from a ComboBox

    Hi @v-yueyun-msft , Thank you for the prompt response.  code below you provided are now returning a value. this is exactly I'm trying to achieve in this ComboBox. Thank you so much for your help! It really helps and learned a lot from this 😀🙏

    vicsaisan_0-1712108353429.png

     

  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: How to exclude a value that already exists in another ComboBox from a ComboBox

    Hi , @vicsaisan 

     

    Thanks for your response! 

    According to your description , you use this code in Combo box 2 -items , right?

    Filter('SharePoint Folders', Approver = ComboBox3.Selected.Approver)  

    And in my understand , the 'SharePoint Folders' is your SharePoint list:

    vyueyunmsft_0-1712107996816.jpeg

     

    Your Combo box 1 -items use this code:

    If(!IsBlank(TextInput1.Text), Distinct('Folders',Title))     This code return a single column table which columnName is [Value].

     

    So now you want to filter the Combo box 1 items based on the Combo box 1 selected item.

    Can you try to use this code in Combo box2 -items in your side:

    Filter( Distinct(Filter('SharePoint Folders', Approver = ComboBox3.Selected.Approver).Title , Title) As items  , !(items.Value in ComboBox1.SelectedItems) )

     

    If this can not show data , can you check if this code can return data when it put on the Button-OnSelect(You can select all the code to see the data):

    Distinct(Filter('SharePoint Folders', Approver = ComboBox3.Selected.Approver).Title

    vyueyunmsft_1-1712107996817.jpeg

     

    And what's the code return in your side:

    ComboBox1.SelectedItems

    vyueyunmsft_2-1712107996819.jpeg

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • floxfloat Profile Picture
    100 on at
    Re: How to exclude a value that already exists in another ComboBox from a ComboBox

    Hi @v-yueyun-msft ,
    I tried the above code unfortunately it's not returning any values. 

    Apologies, I missed to post this.  

    in ComboBox2, I'm filtering the values based in another combo box  e.g ComboBox3 selected item and will return  Title/Folder same values in Combobox1

    Combobox2 ---> ( (this returns values however if a value is already selected in combobox1, the value should not appear in this ComboBox)

    Formula:  

    Filter('SharePoint Folders', Approver = ComboBox3.Selected.Approver)  

     

    ComboBox3 returns the approvers from SharePoint Approver Column based on Selected Folder
    Formula:  Filter('SharePoint Folders', Approver = ComboBox3.Selected.Approver)

    vicsaisan_0-1712055131446.png

     






  • v-yueyun-msft Profile Picture
    on at
    Re: How to exclude a value that already exists in another ComboBox from a ComboBox

    Hi , @vicsaisan 

     

    This is my test sharepoint list:

    vyueyunmsft_0-1712048824724.png

    You can try to use this code in your second Combo box 2 - items peroperty:

    Filter( Distinct(TableName.Title ,Title)  , !(Value in ComboBox1.SelectedItems) )
     
    This is the result when first combo box is selected:
    vyueyunmsft_1-1712048843449.png

    And in your first Combo box 1- OnChange: 

    Reset(ComboBox2)
     
    vyueyunmsft_2-1712049001298.png

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >