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?
Solved! Go to Solution.
didn't know how to format formula
this is my app
this is the applicant screeen (i have "calendar", "deals", "custome" etc etc too), this is a list of applicants. There are more then 50 columns
this is the filter rectangle that i set visible on clicking on the filter icon. I'm building various textboxes and dropdowns to filter columns
this is the first formula i tried, the gallery show some records but not everyone (i tried with excel)
this is the second formula i tried, but the gallery is empty, even if it gives no error
thanks for your time
Hi @diego_marino,
Thank you for posting these information...
Ok, let's try this formula instead:
Filter( Candidati; (
IsBlank(TBcandidatifiltoptftrasferibile.Text)
|| (DPcandidatifiltoptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = TBcandidatifiltoptftrasferibile.Text)
|| (DPcandidatifiltoptftrasferibile.Selected.Value = "<=" && 'Ptf trasferibile personale' <= TBcandidatifiltoptftrasferibile.Text)
|| (DPcandidatifiltoptftrasferibile.Selected.Value = ">=" && 'Ptf trasferibile personale' >= TBcandidatifiltoptftrasferibile.Text)
) )
Can you test this already and see if it works. Then we will see how to add the conditions on the other fields...
Emmanuel
unfortunely not working. I made some tests
this is working properly
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text) )
when i add this other piece (DPcandidatifiltroptftrasferibile.Selected.Value = "=" &&) it returns nothing, even if it gives me no error
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || (DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text)) )
hi
with this formula everything is ok
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text) )
when i add that piece it gives me no error but gallery is empty
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || (DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text)) )
Where do you place your filter formula ?
What are the possible values that the user can enter in the TBcandidatifiltroptftrasferibile field ?
What is the data type of the field 'Ptf trasferibile personale' ?
Use the Value() function only if you want to convert a numeric text into a numeric value.
1) the formula is in gallery items
2) TBcandidatifiltroptftrasferibile is a text input in which user can insert only a number
3) the data type of the field 'Ptf trasferibile personale' is a number sharepoint column, just changed the type from text to number and eliminated the Value() function
Ok, perfect. Since your last changes have you made a test again on both formulas you tested before ?
yes, i tried this one and it's not working
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || (DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = TBcandidatifiltroptftrasferibile.Text) )
Ok. Firstly, since your textbox TBcandidatifiltroptftrasferibile text property returns a string and is compared with your 'Ptf trasferibile personale' field which is numeric, I would add the Value() function around the TBcandidatifiltroptftrasferibile.Text.
Can you try again the formula with just this and tell me if it works:
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text)) )
Then, about your DPcandidatifiltroptftrasferibile dropdown, can you post a capture with the Items property please ? Like this:
Thank you.
ok i tried
Filter( Candidati; IsBlank(TBcandidatifiltroptftrasferibile.Text) || (DPcandidatifiltroptftrasferibile.Selected.Value = "=" && 'Ptf trasferibile personale' = Value(TBcandidatifiltroptftrasferibile.Text)) )
not working