Hi,
I'm trying to do a filter on user().email and a specific date if any date is chosen.
If no date is chosen, filter should only be on user().email
I have a date picker field: ProjWrkOv_Datefilter
I have a button to reset that field to nothing with Reset(ProjWrkOv_Datefilter)
Code like below on items of gallery.
Filter only works if I chose a date, if not, I get no items
Filter('[dbo].[ProjWork]',
Employee = User().Email &&
If(ProjWrkOv_Datefilter.SelectedDate > DateValue("01/01/1970"),
Text(Date,ShortDate) = Text(ProjWrkOv_Datefilter.SelectedDate,ShortDate),
true)
)
Solved! Go to Solution.
Hi,
Found the error.
Even though I have put a label in to show me picked date, I had error with inputtextplaceholder showing 31/12/2001. So my date was always larger than "01/01/1970".
Deleted everything on placeholder and filter worked like a charm.
Can you try this?
Filter('[dbo].[ProjWork]', Employee = User().Email && If(!IsBlank(ProjWrkOv_Datefilter) && ProjWrkOv_Datefilter.SelectedDate > DateValue("01/01/1970"), Text(Date,ShortDate) = Text(ProjWrkOv_Datefilter.SelectedDate,ShortDate), true) )
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.
Thanks!
Hardit Bhatia
https://www.thepoweraddict.com
Hi,
Found the error.
Even though I have put a label in to show me picked date, I had error with inputtextplaceholder showing 31/12/2001. So my date was always larger than "01/01/1970".
Deleted everything on placeholder and filter worked like a charm.
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |