Hi all,
I'm trying to filter a gallery from start date to end date (date pickers). I don't want to run into the delegation issue so i've created a 'strCreated' single line column to use instead. how can i filter the gallery using this field? This is what i have so far but nothing comes up:
Filter(colItems, strCreatedDate >= dpStartDate.SelectedDate && strCreatedDate <= dpEndDate.SelectedDate)
Any clues what I could be missing?
Thanks
Solved! Go to Solution.
Usually PowerApps will cast the value for you, but not always, so give this a try instead:
Filter(colItems,
(Value(strCreatedDate) >= Value(Text(dpStartDate.SelectedDate, "yyyymmdd"))) &&
(Value(strCreatedDate) <= Value(Text(dpEndDate.SelectedDate, "yyyymmdd")))
)
What is the format of your text date you are storing? It must be stored in the yyyymmdd format.
Then your formula will be:
Filter(colItems,
strCreatedDate >= Text(dpStartDate.SelectedDate, "yyyymmdd") &&
strCreatedDate <= Text(dpEndDate.SelectedDate, "yyyymmdd")
)
I hope this is helpful for you.
Hi @RandyHayes i tried your suggestion but it looks like it's looking for a number value. This is the error i get:
When i change the Text to Value instead there are no errors but nothing it being pulled in the gallery.
Usually PowerApps will cast the value for you, but not always, so give this a try instead:
Filter(colItems,
(Value(strCreatedDate) >= Value(Text(dpStartDate.SelectedDate, "yyyymmdd"))) &&
(Value(strCreatedDate) <= Value(Text(dpEndDate.SelectedDate, "yyyymmdd")))
)
User | Count |
---|---|
193 | |
127 | |
88 | |
48 | |
42 |
User | Count |
---|---|
279 | |
162 | |
136 | |
81 | |
78 |