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 Apps
Answered

problem on filter

(0) ShareShare
ReportReport
Posted on by 113

hi,

i use this formula

Filter(
 Candidati;
 StartsWith(
 Cognome;
 TBcercacandidato.Text
 ) && (IsBlank(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = ">=" && 'Ptf trasferibile personale' >= Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "<=" && 'Ptf trasferibile personale' <= Value(TBcandidatifiltroptftrasferibile.Text)) && (IsEmpty(CBcandidatifiltrocomune.SelectedItems.IDComune) || ComuneID = CBcandidatifiltrocomune.Selected.IDComune)
)

the formula works properly, but i have to choose a value in CBcandidatifiltrocomune and then reset the value, otherwise it returns only records with "comuneID" blank

 

DP= date picker

CB= combobox

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @diego_marino 

    Hello there.  I'll need some more information to help diagnose what the issue is with your formula.  Can you please take the following screenshots.

     

    • The screen prior to the user taking any actions (to identify the intial state)
    • The screen after the user chooses a value in CBcandidatifiltrocomune (to identify the error)
    • The screen showing the desired result after you perform the reset (to identify the desired result).

     

    Also, you will need to provide any code within the Default property of your combobox CBcandidatifiltrocomune.  Once this information is provided i feel we will have enough information to start working on a solution.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @diego_marino 

     

    Filter(
    Candidati;
    StartsWith(
    Cognome;
    TBcercacandidato.Text
    ) && (IsBlank(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = ">=" && 'Ptf trasferibile personale' >= Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "<=" && 'Ptf trasferibile personale' <= Value(TBcandidatifiltroptftrasferibile.Text)) && (IsEmpty(CBcandidatifiltrocomune.SelectedItems.IDComune) || ComuneID = CBcandidatifiltrocomune.Selected.IDComune)
    )

     

    Assuming the bold part is your issue

     

    try replacing  (IsEmpty(CBcandidatifiltrocomune.SelectedItems.IDComune) || ComuneID = CBcandidatifiltrocomune.Selected.IDComune)

    with (ComuneID = CBcandidatifiltrocomune.Selected.IDComune || If(
    IsEmpty(CBcandidatifiltrocomune.SelectedItems.IDComune),
    true,
    false
    ))

     

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

  • diego_marino Profile Picture
    113 on at

    thanks you both for interest

    this is the gallery in the first run. I have almost 7k records, and it shows only 307 that are the records with "comuneID" blank

     

    Cattura.PNG

     

    then i click on filter button to open the filters and i set the cbcandidatifiltrocomune to the first city in the list and it shows  nothing (actually i don't know if i have some guy in that city)

    Cattura1.PNG

     

    the i set that combobox to blank and it shows 2000 records, that's the max value i can get with delegation (maybe you can suggest me how to overcome delegation in count rows)

     

    Cattura2.PNG

     

    i tried the suggested formula

    Filter(
     Candidati;
     StartsWith(
     Cognome;
     TBcercacandidato.Text
     ) && (IsBlank(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = ">=" && 'Ptf trasferibile personale' >= Value(TBcandidatifiltroptftrasferibile.Text) || DPcandidatifiltroptftrasferibile.Selected.Value = "<=" && 'Ptf trasferibile personale' <= Value(TBcandidatifiltroptftrasferibile.Text)) && (ComuneID = CBcandidatifiltrocomune.Selected.IDComune || If(
     IsEmpty(CBcandidatifiltrocomune.SelectedItems.IDComune);
     true;
     false
     ))
    )

    the default value and defaultselecteditems are just blank

     

    thanks

  • Verified answer
    diego_marino Profile Picture
    113 on at

    solved

    IsBlank(CBcandidatifiltrocomune.SelectedItems.IDComune) || ComuneID=CBcandidatifiltrocomune.Selected.IDComune)

    i have to use "IsBlank" instead of "isEmpty"

     

    edit, it's not solved.

    Now the first run is ok, then when i use a combobox to filter and then i reset it i have the same problem, but this time in the "second run"

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard