SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Shared Document Library with a choice column with 3 choices: Test1, Test2, I also have 3 views, one for Test1, Test2, Test3, this is because I have three pages where I want to display the Shared Document Library, each one using a different view.

So now when a user selects Add Document on either of those pages the choice column defaults to Test1...users are prone to not noticing this and then they won't see their document where they expect. Is there a way to calculate the default value of the choice column based on the current view or current URL of the page they are on? I know you can select a default value that is calculated but I'm not sure how to actually write something like this in the calculation or if its even possible.


share|improve this question

Yes, I have used a URL parameter to do this in the past. So you need to add a button or something to your page which calls your form but with the parameter you need eg /NewForm.aspx?choice=Test1

You can then used JavaScript or jQuery in the form to get the parameter and set the default of the choice field.

There is an example here here though you may need to tweak for your specific requirements.

share|improve this answer

you can try doing this by using 3 content types. 3 choice field and 1 calculated field. 1 CT = first choice field defaulted to test1 1 CT = second choice field defaulted to test2 1 CT = third choice field defaulted to test3 1 Calculated field that concatenates the value of the first, second and third choice field. The calculated field would be the one for you to use to separate items by views

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.