Forum

This content is now out of date.

Visit Our Community

Can I have Date Filter with default values but also editable

Hi,

I would like to set the date filter to default retrieve the last 10 days data but still editable for the user to change the date. Is this doable? (Please see attached screenshot)

Thanks.

Rgds
Stephen



Hi Stephen,

yes this is possible, what you need to do is to go to the Edit->Filter screen and then select Between as the filter operator, but leave the value as User Prompt. Then progress through the Report Builder to the last screen and choose the Filter menu, select your filter field from the drop down box.

Next, click the Entry Style link, select User Prompt and also the User Prompt check box, select Between Current Date - 10 days And Current Date.

Now the date fields will have default values but also allow the user to choose another value by the User Prompt icon. It is also possible to place the cursor in the filter date fields and modify the date field that way.


Forum image


Please let me know how this goes for you.

Regards,
David
I am also trying to achieve this, but my Entry style menu only has User Entry option, no Allow Prompt. And the Default Value part has only the precise dates selection, not relative.

I assume this is due to the field being datetime type rather than just date. If i create a calculated field that truncates my datetime field and use that one as a filter i get the menu that you are referring to.

Is it possible to have datetime (not just date) filter that's user prompt and has default values that are relative, not exact?
Hi,

That is correct, when using date times (time stamps) we do not allow a 'default value'. Generally, there is no need to have a date time default value, as you are aware it would be to the second, so it's not a very useful default.
Date values we can understand as being useful default values, so if you would like to have a default value for a time stamp field, you will need to convert it to a date.
There is no way to enter a date value, for a time stamp field, as this simply wouldn't work.

Apologies for the inconvenience.

Hope this info was useful.

Regards,
David

Hi David,

Is there any request enhancement for setting default value using DateTime data type.

This is basically use full for us if you have query getting Top 1 record of DateTime Field on specific time of the day for example.

Also it is nice to have if there would be User entry formatting option in Filter for DateTime.

Thanks


Regards,
Cernan