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 / Search with dropdownli...
Power Apps
Answered

Search with dropdownlist and blanck

(0) ShareShare
ReportReport
Posted on by 50

Hi;

i have table with data from SharePoint list, i add seven filters as dropdown list, but i have a problem when some of filter are blanc, may search don't display data, i don't know how to manage my search when some filter are blanck, this is my code

 

 

ClearCollect(
 ListeRetombee;
 Filter(
 Retombées;
 'Nom '.Value = RechNom.SelectedText.Titre;
 'Mois'.Value = RechMois.Selected.Value;
 'Année'=annee.Text;
 Approuvée=AppFilter.SelectedText.Value;
 'Thème'.Value=RechThPrin.SelectedText.Titre;
 'Thème2'.Value=RechThSec.SelectedText.Titre;
 Secteur.Value = RechSec.SelectedText.Title ;
 Approbateur.DisplayName=RechApp.SelectedText.DisplayName

 )
);;

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

     

    I guess you mean you have blank input to the filter (like 

    'Nom '.Value = RechNom.SelectedText.Titre; //RechNom.SelectedText.Titre is blank

    To solve this you can put all the filter statement in a if. But remember to allways have a fallback condition, or it will not work. Example:

    ClearCollect(
     ListeRetombee;
     Filter(
     Retombées;
     If(!IsBlank(RechNom.SelectedText.Titre);
     'Nom '.Value = RechNom.SelectedText.Titre;
     ID>0
     ); //Or some other filter that will get all the items.
     IF(!IsBlank(RechMois.Selected.Value)
     'Mois'.Value = RechMois.Selected.Value;
     ID>0
     );
     ...<continue with all fields>
    
     )
    );;

    Please note ID>0 is not a delegable expression if you are working directly with the data from sharepoint, so you might use another expression. Alternativly you can make a new column in you datasource called __ID (or something). And run a flow to make it equal the ID every time you make a new record. 

     

    If I misunderstood your question, please let me know with some more information about what you try to do. 

     

     

  • Khedidja1990 Profile Picture
    50 on at

    Maybe I misexpressed my need, first of all I thank you for your answer. what I want to do for example if my filter name = All or blanck and filter sector = sector1 and filter month = April, and all other filter are on All or blanck I want my search to show me all the names that have sector 1 and the month of April

  • Khedidja1990 Profile Picture
    50 on at

    it's work correctly, thank you 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard