0

I have a Shared Document Library with a choice column with 3 choices: Test1, Test2, Test3...now 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.

Thanks!

2 Answers 2

1

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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