What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

Is it possible to set a default value for a Data Explorer query parameter?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

You can link to particular queries and have it fill in the parameters for you . For example, here's your comment score distribution on Stack Overflow.

You can also now save default values directly in your parameters using the ##Param?Default## syntax. To see how this works, look at this live demonstration. Note that this will be the default for everyone running the query, so it makes sense to only use this in cases where the default value will make sense for most people.

Default values can also be used with typed parameters, just make sure to put the default value after the type like ##Param:Type?Default## (and use a default value that's an acceptable value for the type).

share|improve this answer
    
Just testing.... Skeet vs Gravell –  George Duckett Oct 10 '11 at 15:39

You can specify the values in the query string if you're sending the URL to someone. For example: http://data.stackexchange.com/stackoverflow/q/114799/?x=12345

I don't think there's a way to hardcode defaults into the script itself

share|improve this answer

I had got my id in UserId textbox after running several different queries. Now i always see my id and simply click on Run Query button.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .