locked
Infopath - Sharepoint - MultiSelect List RRS feed

  • Question

  • How can branching be created in an Infopath Sharepoint MultiSelect List?

    OR

    For example, A is heading.  AA, AB, AC are subtopics. In the multiselect list box, if a user selects/checks AC, then heading A is automatically checked. How to get that to happen?


    1/4 administrator 1/4 developer 1/4 project manager 1/4 instructor
    Thursday, November 18, 2010 9:47 PM

Answers

  • Hi,

    You can do the following. Put one optional section on the Infopath form and inside it, put one Check Box. Name this Checkbox as "Phone Company" (Which will be main check box). Just below this Check Box (Inside the optional section), put one more optional section and in that create two Check Boxes. Name the first Check Box as "Logistics" and the other as "Equipment".

    Set your rules in such a way that when a user opens the form, only the main Check Box i.e. Phone Company is visible. Once the user selects the "Phone Company" Check Box, the next optional section (Which contains two Check Boxes) should become visible.

    In short, If the main check box is clicked then only the other two check boxes will be visible and vice versa.

    Regards

    Ginni [My SharePoint Blog ]

    • Proposed as answer by Parvez Akkas Thursday, December 30, 2010 1:48 AM
    • Marked as answer by Clayton Cobb Thursday, December 30, 2010 1:56 AM
    Tuesday, December 7, 2010 6:27 AM

All replies

  • What do you mean by "heading"?  Where are the subtopics and where are the headings?  Please explain in fine detail.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Friday, November 19, 2010 8:50 AM
  • Better explanation.

    (check box)  A - Main heading (Phone Company)

    (check box)       aa - subheading (Logistics)

    (check box)       ab - subheading (Equipment)

    (check box)  B - Main heading (Internet Company)

    (check box)       ba - subheading (Logistics)

    (check box)       bb - subheading (Equipment)

    If "ab" is selected, then "A" is automatically checked.   If "ba" is selected, then "B" is automatically checked.  How to get Infopath to do this?


    1/4 administrator 1/4 developer 1/4 project manager 1/4 instructor
    Monday, December 6, 2010 1:41 PM
  • Can you post what your datasource looks like (just the nodes in question)

    Thanks

    Ed

    Monday, December 6, 2010 5:15 PM
  • Hi,

    You can do the following. Put one optional section on the Infopath form and inside it, put one Check Box. Name this Checkbox as "Phone Company" (Which will be main check box). Just below this Check Box (Inside the optional section), put one more optional section and in that create two Check Boxes. Name the first Check Box as "Logistics" and the other as "Equipment".

    Set your rules in such a way that when a user opens the form, only the main Check Box i.e. Phone Company is visible. Once the user selects the "Phone Company" Check Box, the next optional section (Which contains two Check Boxes) should become visible.

    In short, If the main check box is clicked then only the other two check boxes will be visible and vice versa.

    Regards

    Ginni [My SharePoint Blog ]

    • Proposed as answer by Parvez Akkas Thursday, December 30, 2010 1:48 AM
    • Marked as answer by Clayton Cobb Thursday, December 30, 2010 1:56 AM
    Tuesday, December 7, 2010 6:27 AM
  • Implement the Changed event handler in code behind where you can go through all items in the multi select list and decide which one to set and which one not. 

    Pseudo code:

     

     public void InternalStartup()

            {

                EventManager.XmlEvents["/my:myFields/my:group8/my:multiSelect"].Changed += new XmlChangedEventHandler(MultiSelect_Changed);

            }

     

            public void MultiSelect_Changed(object sender, XmlEventArgs e)

            {

                XPathNavigator secDSNav = MainDataSource.CreateNavigator();

     

                XPathNodeIterator items= secDSNav.Select( "/my:myFields/my:group8/my:multiSelect", NamespaceManager);

                while (items.MoveNext())

                {

    //                item  = items.Current.SelectSingleNode("@item", NamespaceManager).Value;

    // set item value

                }

            }

    Tuesday, December 7, 2010 3:16 PM
  • Options

    Look up values from an external data source (SELECTED)

    Datasource: TECHNOLOGY LIST SELECTION

    Entries: List of Department

    Value: @Name

    Display name: @Name

    Hope this helps.


    1/4 administrator 1/4 developer 1/4 project manager 1/4 instructor
    Monday, December 20, 2010 4:46 PM
  • I would have loved to do this, but I have lists ranging from 50 to 400 entries.
    1/4 administrator 1/4 developer 1/4 project manager 1/4 instructor
    Monday, December 20, 2010 4:49 PM
  • You can achieve it out of box.

    Put a condition of your Main check box A as if anyone in the list is selected, then make it true.

    You can write the condition like Whether Check box List contains aa, then select A


    Bhanu Y Sagar
    Tuesday, December 21, 2010 6:08 AM
  • I know it's a month old, but just ran into this and thought I'd put my suggestion too.

    What Ginni suggested should be good. No coding required. If you want single click user experience, then you can add rule to each subheading to have the appropriate main heading checked ON/OFF.


    Pman
    http://www.pmansLab.com/
    Thursday, December 30, 2010 1:51 AM