I want to set the default value of the parameter according to the current time.
I want to set the default value of the parameter according to the current time.
There's currently no way I know of to make a parameter default to the current date and time, but you can get the current date to show up in the dropdown list of values. Just set your parameter's Suggested Values dropdown to Query, and point it at a query that returns a list containing the current date and time, a la:
= {DateTime.FixedLocalNow()}
Another option would be to modify your logic so that if the parameter is blank, the current date/time is used. Then users can leave it blank and get the default behavior.
2 people are following this question.