cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
diegomarino
Helper III
Helper III

filter using a dropdown operator

hi,

i'd like to filter a gallery using a dropdown

the problem is that the dropdown value is not a value i want to search, but is the operator

 

example

 

dropdown vaue: =

search textbox: 35

 

so i have selected the "= 35", but in the dropdown i have more than, less then....

 

how can i make a filter formula with that?

25 REPLIES 25

This should definitly work. So there must be a problem elsewhere. I'm trying to think where it could be...

Can you post a capture of the field 'Ptf trasferibile personale' definition in the list ?

Do you want to filter you gallery on the numeric values I point out here with my red arrows?

Cattura.PNG

Can you post a capture of an example of your filter screen where I can see the values you enter in the TBcandidatifiltroptftrasferibile text box?

Can you post a capture of the list items in SharePoint that should be returned with the corresponding filter value?

Thanks a lot for your patience,

Emmanuel

View solution in original post

this is the definition of sharepoint field "ptf trasferibile personale", and yes, this is the one we are trying to filter

 

Cattura1.PNG

this is my filter view

 

Cattura2.PNG

 

this is a filtered view of my sharepoint list. Maybe i didn't get everything you asked for

 

Cattura3.PNG

 

thanks very much

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ok. But on your list item capture, you show me that you have filtered the 'Ptf banca personale' field while we are trying to filter the 'Ptf trasferibile personale' field with our filter function !

Do you agree with the following image showing which part of the filter should filter which list columns ?

Cattura3.PNG

 

Now, let's go slow. Try first this formula:

FORMULA 1

Filter(
    Candidati;
    IsBlank(TBcandidatifiltroptftrasferibile.Text) || 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text))
)

On the filter screen, just enter "20" for filter 'Ptf trasferibile', then check your gallery to see if you have any results.

Do you have results in the gallery ?

 

Then try this formula:

FORMULA 2

Filter(
    Candidati;
    IsBlank(TBcandidatifiltroptftrasferibile.Text) || (DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text))
)

On the filter screen, choose "=" and enter "20" for filter 'Ptf trasferibile', then check your gallery to see if you have any results.

Do you have results in the gallery ?

about the filed in sharepoint you're right! i'm going mad i made a mistake.

 

now...everything works fine! but it seems we changed nothing.... how is it possible? i made this formula

Filter(
    Candidati;
    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))))
)

and i checked with excel every record is ok!!! thanks a lot

 

i made more

 

Filter(
    Candidati;
    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)
)

it returns the right values

 

THANKS! 

Glad it works !

Would you mind taking a few seconds to Accept as a Solution one of the posts ? I suggest this one:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/filter-using-a-dropdown-operator/m-p...

Other people will find the answer more quickly...

Thanks,

Emmanuel

for some reason i'm not able to accept a reply as solution. I dunno why. could yu make this for me? sorry you have to, but i don't see the button 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,699)