Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Changing Table Filter Returns Blank Values

(1) ShareShare
ReportReport
Posted on by 11

I have a dropdown that I want to change the source of based on a radio selection. Items property of the dropdown is set to the collection SystemNumbers. I have a table with 3 different columns that correspond to the 3 different radio options. When I select the 1st option, it correctly displays the items in the dropdown, but the other 2 radio options display a ton of blank records.

 

Here's what that looks like:

CorrectPowerApp.jpgIncorrectPowerApp.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is the code I am using currently in the OnSelect function of the radio button:

 

ClearCollect(SystemNumbers, Switch(
 SiteSelector.Selected.Value,
 "AAA",Filter(SystemLookup[@AAA], Len(AAA)>6),
 "BBB",Filter(SystemLookup[@BBB], Len(BBB)>6),
 "CCC",Filter(SystemLookup[@CCC], Len(CCC)>6)
))

 

 

For reference, if I set the items property of the dropdown directly to BBB or CCC like this, it works correctly:

 

Filter(SystemLookup[@BBB], Len(BBB)>6)

 

 

 

For whatever reason the switch statement (I've also tried with IF statements) causes issues. Has anyone seen anything like this or know how to fix it?

  • kochbd Profile Picture
    11 on at
    Re: Changing Table Filter Returns Blank Values

    This worked! I enclosed it in the ClearCollect statement I had originally, and then once I initialized the collection SystemNumbers with the column name "Value" it started switching the dropdown correctly. Thank you so much for the help!

    Collect(SystemNumbers, {Value: ""});

     

  • SunilPashikanti Profile Picture
    731 Super User 2025 Season 1 on at
    Re: Changing Table Filter Returns Blank Values

    Can you give a try like below:

     

    ClearCollect(SystemNumbers,
     Switch(
     SiteSelector.Selected.Value,
     "AAA", Filter(SystemLookup, !IsBlank(AAA)),
     "BBB", Filter(SystemLookup, !IsBlank(BBB)),
     "CCC", Filter(SystemLookup, !IsBlank(CCC))
     )
    )
  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Changing Table Filter Returns Blank Values

    @kochbd - the column names need to be consistent. Consider using RenameColumns (not delegable):

     

    Switch(
     SiteSelector.Selected.Value,
     "AAA",
     RenameColumns(
     Filter(
     SystemLookup,
     Len(AAA) > 6
     ),
     AAA,
     Value
     ),
     "BBB",
     RenameColumns(
     Filter(
     SystemLookup,
     Len(BBB) > 6
     ),
     BBB,
     Value
     ),
     "BBB",
     RenameColumns(
     Filter(
     SystemLookup,
     Len(CCC) > 6
     ),
     CCC,
     Value
     )
    )

     

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard