Drop down default value is not working

I used the drop-down control default filed as 2024 for the year filter, the front-end shows that it picked 2024 when I refresh the page, but the data doesn’t change until I open and do the select my self.

DZlAmir_1-1730386422631.png

Try setting an explicit default value in the control settings, if possible, or use a script to programmatically trigger the filter when the page loads. This should force the data to refresh based on the default selection without needing manual interaction.

1 Like

thanks a lot for the suggestions how to do a script that runs with the page loading do you have any documentation or something ?

I’m experiencing this as well.

  • Added drop-down control and set date with Year Month format (because I want it to be monthly.
  • Set the default selection as ‘Nov 2024’

However, the behaviour seems like it doesn’t recognise the default selection, it creates another ‘Nov 2024’ instead.

1 Like

Hi @DZlAmir , did you manage to solve this? If yes, mind to share how you solved this?

Actually not still having the same issue I just gave up on this

I encountered the same issue and thanks to a colleague, I have found a fix to this ! So the issue is that the filtering parameter is a date data type while the default value is in a string data type. Way around this is to create a filtering parameter using calculated field that is in a string data type.

e.g. Case when Year (creation_date) = 2024 then ‘2024’ else ‘2025’ end.

Using the above calculated field as the new filtering parameter, the default value should now work.

1 Like

Thanks this is a good work around