locked
multiple default value on a choice column RRS feed

  • Question

  •  

    can I have multiple default value on a choice column?

     

     

    Wednesday, January 30, 2008 2:44 PM

Answers

  • Put this in the calculated field

    =";#choice1;#choice2;#choice3;#" 
    Tuesday, July 21, 2009 8:20 PM

All replies

  • I don't believe this is possible from the settings page.  However check out this MSDN SharePoint Designer blog post on details how to use Javascript to set these at runtime.  I haven't used it for the choice column, but it should work for that as well.

     

    From the post:

     

    When might you use this?

    It’s pretty easy to set a field’s default value through the list settings in the browser UI, so why might you need Javascript to set a default field value? The reason is that field default values can only take static values or simple formulae based on the current user or today’s date. If that meets your needs, then I’d definitely recommend sticking with that method. Sometimes, though, you may want the form to fill with default values based on the user’s interaction with the previous page, and that’s exactly where this method comes in.

     

    How does it work?

    In short, we add some Javascript to the page that runs when the body is loaded. This Javascript parses the page’s query string, locates the HTML objects that are rendered by the relevant SharePoint fields, and sets their value based on the information in the query string.

     

    HTH,

    Kale

    Wednesday, January 30, 2008 4:04 PM
  • Yes you do. All you need to do is to choose Checkbox as the display type under Additional Column Settings.

    Wednesday, January 30, 2008 4:31 PM
  • but i need to set multiple default values for the checkboxes.

    Wednesday, January 30, 2008 4:36 PM
  • Sorry, misunderstood the question.

     

    Wednesday, January 30, 2008 4:37 PM
  • My question is more or less the same;
    On a choice column I have selected the display option "Checkboxes (allow multiple selections)". My checkboxes are for example:
    India
    Russia
    Turkey


    I want that all checkboxes are checked by default. Sharepoint allows me to set a "default value" using this:

      Default value:
       

    When I select 'choice' and then put in for example India it works, India is then checked by default. What should I enter to have all checkboxes checked by default?
    Thanks
    • Edited by RLAS Wednesday, October 29, 2008 12:25 PM
    Wednesday, October 29, 2008 12:25 PM
  • Put this in the calculated field

    =";#choice1;#choice2;#choice3;#" 
    Tuesday, July 21, 2009 8:20 PM
  • This worked for me perfectly.
    Wednesday, February 13, 2013 1:59 AM
  • Nice post. Thanks for the advice!

    Mike Corkery, MCT, MVP (Office Systems), MCSD (Windows Store Apps), MCITP, MCPD, MSF, etc. Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

    Thursday, February 6, 2014 8:54 PM