How to Select ALL Items in Multiselection Listbox in Infopath 2010 - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to Select ALL Items in Multiselection Listbox in Infopath 2010

Last post 01-11-2017 01:24 PM by Momo85. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 04-19-2012 12:03 AM

    How to Select ALL Items in Multiselection Listbox in Infopath 2010

    I have created a customized Form for a SharePoint List.

    I want to select all the items in multiselection list box of infopath which has a datasource from sharepoint list.

    i have a checkbox "Select ALL" when the user checked it, all the items in multiselection list box should be selected or checked.

    is there any solution so that i can do it by defining some rule??

    OR

    if by code then how can i do it?

    here is the well defined image for understanding the problem.

    please guide me.

    Thanks in Advance,

    With Regards,


    Muhammad Luqman


  • 04-19-2012 03:13 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    i have done this for SharePoint Form Library through code..

     But my requirement is to do this for sharepoint LIST.and there is no developer tab so i cant code it... :(

    plz tell me how can i do this through rule?

     

  • 04-20-2012 07:31 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    So that I understand this correctly.

    You have a bunch of datasources.  When you select the select all toggle button, you want to use all datasources for something?

    Or

    The toggle buttons aren't tied to anything, you just want the select all toggle button to check the boxes under it?

  • 04-20-2012 07:37 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

     i just want to do is when i select this checkbox "SelectAll"

    All the items in Multiselection list box should be selected.

    and when i uncheck "SelectAll"  checkbox, all the items in the multiselection list box should be unchecked or deselected.

  • 04-23-2012 05:09 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    You will have to add a rule to the 'Select All" toggle that selects all the other toggles when the 'Select All' is selected.
    You will also have to write a rule in each of the other toggles that checks to see if that toggle is not selected, then 'Select All' has to be unchecked as well.

    I added a sample form to show you how it would work.  You can extend it to make it work for as many toggles as you need.

  • 04-23-2012 05:59 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

     hi leoffneym

    first of all thanks for your reply.

    i have check your sample, it works fine but that is not what i want..

    as you can see in the image, i have used Multiselection list box not seperate checkboxes.

     and this multiselection list box has a datasource from sharepoint list.

    so we can not judge how many items may come in this list.

    hope you have understood my question.

    please guide me.

    with Regards,

    Luqman

  • 09-24-2012 04:06 PM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    Hi,

    Were you able to find a solution for this?
    I have a multiselect box,  and I want to give an option to my users that allows them to select a 'Global' Option that will check all the boxes within the multiselection box.

    Does anyone know how to do this?

    I'm not pulling my options from a SharePoint list,  I'm manually entering them into my form.  Not sure if that would make it easier or not?

  • 09-24-2012 11:47 PM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    luqmansky:

    i have done this for SharePoint Form Library through code..

     But my requirement is to do this for sharepoint LIST.and there is no developer tab so i cant code it... :(


     

    It is impossible to have the code in Infopath form of type/compatibility Sharepoint List Form (the Infopath form template created by clicking Customize Form button on ribbon in a browser or using Sharepoint List template in Infopath Designer 2010).

    This does not mean impossibility to have a code-behind in other types of Infopath forms putting/getting data into/from sharepoint list.

    luqmansky:
    i have done this for SharePoint Form Library through code..

     But my requirement is to do this for sharepoint LIST.and there is no developer tab so i cant code it... :(


     So, use Infopath form template published into sharepoint form library with sharepoint list data connections/sources to sharepoint list or web services operating with sharepoint lists.

    illegal_operation:
    Does anyone know how to do this?

    Please check:

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 09-25-2012 07:54 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010


    illegal_operation:

    Thanks, I'm looking this over now.   Will this work in a browser based form?
    Also since this is using code,  I'm guessing that this will publish to a sandbox solution correct?  

  • 09-25-2012 09:11 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    illegal_operation:
    Will this work in a browser based form?
     

    In Infopath 2010 - yes, I enclosed the template with VSTA C# project

    In 2007, IMO, Multiple Selection List Box is not available in browser forms, only in client/filler forms.

    illegal_operation:
    Also since this is using code,  I'm guessing that this will publish to a sandbox solution correct?  
     

    I published and run it from my Sharepoint Online (Office 365) site. I believe it is impossible to run anything non-sandbox there, really never worry about that there

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 09-28-2012 09:43 AM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    Thanks,  I was able to get the button working and it now selects all the options in my multiselect field.

    One other question though:

    I'm publishing this field to SharePoint,  and I noticed that in SharePoint it puts each option on a new line so it makes that row huge if all are selected.   Is there a way to have it display the options selected horizontally?

    So instead of this:

    Option 1
    Option 2
    Option 3

     It could display it like this in SharePoint

    Option 1, Option 2, Option 3

  • 09-28-2012 01:18 PM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    hmm,

    just when I thought everything besides the formatting was working,  I just noticed something.

    When you click the global button,  it selects all the fields just like it's supposed too.

    But when you save the form,  and then go into SharePoint to view the entry,  the very last checkbox value is listed twice.   Once at the beginning and once at the end.

    So it does something like this

    Option 3  <<<  why is it doing this?
    Option 1
    Option 2
    Option 3

  • 09-28-2012 05:25 PM In reply to

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

     

    illegal_operation:
    I noticed that in SharePoint it puts each option on a new line so it makes that row huge if all are selected
     

    Ypu can change the widrh to adapt it to occupied size and reutilize the rest for other controls

    illegal_operation:

    So instead of this:

    Option 1
    Option 2
    Option 3

     It could display it like this in SharePoint

    Option 1, Option 2, Option 3

     

    It seems to me to be more clumsy and inconvenient.

    Anyway we do not have control over this

    illegal_operation:

    But when you save the form,  and then go into SharePoint to view the entry,  the very last checkbox value is listed twice.   Once at the beginning and once at the end.

    So it does something like this

    Option 3  <<<  why is it doing this?
    Option 1
    Option 2
    Option 3

     

    I created and saved an XML data form from my XSN template I enclosed above both in browser and Filler, opened both in browser and filler/client and could not see anything resembling your problem 

     

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 01-11-2017 01:24 PM In reply to

    • Momo85
    • Not Ranked
      Male
    • Joined on 03-05-2013
    • Jhb SA
    • Posts 5

    Re: How to Select ALL Items in Multiselection Listbox in Infopath 2010

    Hi How did you get the button to work, I'm having difficulty achieving that
Page 1 of 1 (14 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.