Hello Bubblers,
I want to set a dropdown filter by month from created date?
Is there any way to do so?
Thanks
Hello Bubblers,
I want to set a dropdown filter by month from created date?
Is there any way to do so?
Thanks
Hello @ysthen97
This video creates dropdown filter by month from created date .
In my database I have the data type I would like to filter. In my case that is called Blog Post. On the data type I have a data field I call Month Number as well as a data field I call Year Number…both are of type number.
With that setup I can then set up my filter selection to be a dropdown element which has a dynamic data choices as an Option Set. My option set has the display values set to the Month Name (ie: April, May etc.) and then it also has an attribute of type number which I call month number and set those values accordingly. Always remember dates are nothing but numbers, so a month of January is equal to 1, a day of Sunday is equal to 0 and Monday is equal to 1.
Then in my repeating group I can set a search constraint that the month number (from the data type data field month number) is equal to the dropdown value month number (attribute from option set).
I do this because I also use the :group by feature to show the blog posts sorted by month and year, so users can see posts they created in June of 2021 in a different section than those created in June 2022, which is why I also have the data field of year number.
Hi, thanks for your sharing,
But I want to do the filter like this.
Hi Boston, same as what I do but I think don’t have other way for setting no need to create a new data field isn’t?
@ysthen97 I have a table called “product” in which i have a “manufacture date” with data type as date.
So while displaying the data of products for each month in repeating group i used a filter like this…
Where as my dropdown is an option set (called as Current Year Months here) which contains fields (Display (Text), Month (date)
That filters my data as you want
My need for the data field is more for the group by feature so that January 2021 is not the same as January 2022, because if you were to try and use a dropdown you would want to not just show January but instead as your image shows January and the year.
For me, I am not too concerned with adding data fields if they get me a function I need. With things like numbers they are very small and do not produce a large negative effect on performance or storage.
What do you take as default value then?
I am stuck at the default value as am using it for charts in dashboard
This topic was automatically closed after 70 days. New replies are no longer allowed.