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 / Filter Combobox of Sha...
Power Apps
Answered

Filter Combobox of Sharepoint ListA based on toggle of Sharepoint ListB.

(0) ShareShare
ReportReport
Posted on by 90

Hello,

 

I have 2 sharepoint lists: ListA and ListB. ListA has column for Names which is a text field and ListB has a column for if a user is there or not there (Yes/No) which is a toggle field.I have a combobox that displays the names in names column, but I want the names in the combobox to be based on if the person is there or not there (from the yes/no column). I also have a toggle next to the combobox that should control this.

 

I would also like to note, I have a column called ID in both lists that have the same values.

 

Thanks !

How can I achieve this?

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @Rag23 - I might be reading your post too simply, but is this all you're trying to do?

     

    Filter(
     'Your Data Source',
     'Your Yes No Column' = Toggle1.Value
    )
    
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Rag23,

    Do you want to filter names in ComboBox based on the Toggle control by the ID column in both list?

     

    If so, please set the Items property of the ComboBox as below:

    Filter(ListA,ID in Filter(ListB,ToogleField=Toggle1.Value).ID).Name
  • Rag23 Profile Picture
    90 on at

    Thanks for the reply! I got an error that power apps can’t conver some types of data in the formula. I think this is because the ID column which is the connected is a text field in both lists. How can I fix this?

    Thanks again! 🙂

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

    Hi @Rag23,

    You need to post the specific error message and show me how you write this formula on your side.

    Also, what do you mean by "ID column which is the connected is a text field"?

     

    I have a test on my side and it works:

    vqiaqimsft_0-1697007342647.png

     

  • Rag23 Profile Picture
    90 on at

    Sorry for confusing you. 
    Filter(ListA,ID in Filter(ListB,ToogleField=Toggle1.Value).ID).Name

    I did it like this but instead of ID I have another column that is a text field. So I can try connecting them based on that text field column which should be the same in both lists. So I am not  using the ID column.

     

    The error I get is:

     

    Can’t  convert this data type. Power Apps can’t convert Text to a Record. 

    Thanks once again!

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

    HI @Rag23,

    So, I am asking your for the original fomrula you used in your scenario, not the one I gave you.... because the one I gave you works greate on my side, I could not figure it out based on this detail....😂

     

    I need you to post the originla formula you wrote in your formula bar, and give me a screenshot related to that error message, remember to hide the privacy info....

     

  • Rag23 Profile Picture
    90 on at

    Hello,

     

    here is the code:

     

    Filter(Students, StudentID in Filter(‘additional information’, Toggle=Toggle1.Value).StudentID).‘First, Last’

     

    the red squiggly like is under the first StudentID.

    note: StudentID is a text field in the first list and the same name is given to the column in the second list 2. In both lists it is a text field.

     

    Thanks! Appreciate your support.

     

    Rag23_0-1697023575181.png

     

     

  • Rag23 Profile Picture
    90 on at

    Hi @v-qiaqi-msft ,

     

    Based on the error and the formula I provided. Do you think you can help me out?

     

    Thanks

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Rag23,

    I have repeated times to get a screenshot of this specific error message and the original formula you wrote in your formula bar.

    This is what I want:

    vqiaqimsft_1-1697160677685.png

     

    Also, I have tested a Text column in my Filter(), and it works fine as well.

    vqiaqimsft_0-1697160416775.png

    For your issue, I could help you based on your current details, I am not sure if the column type is single-line-of-text, unless you show me the column settings of your task column.

  • Rag23 Profile Picture
    90 on at

    Hi @v-qiaqi-msft ,


    Thanks for your help! 

    It works now! I used the same formula you provided:

     

    Filter(ListA,ID in Filter(ListB,ToogleField=Toggle1.Value).ID).Name

     

    but for some reason, I had to use a calculated column for the StudentID columns in both lists and I used the name of the calculated column instead.

    Any ideas why?

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard