Set mutiple items to TRUE/FALSE in Multi-select List box - InfoPath Dev
in

InfoPath Dev

Office365 Alert - Sandbox has been deprecated in SharePoint Online.
Read more here.

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Set mutiple items to TRUE/FALSE in Multi-select List box

Last post 01-11-2017 07:58 AM by Winnie. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-09-2017 02:46 PM

    Set mutiple items to TRUE/FALSE in Multi-select List box

    Hi,

    I have a scenario where a user needs to be able to check/uncheck multiple items in a multi-select list box based on another control.

    For example, lets say the user is required to select a pattern name

    • Pattern 1 - blue, red
    • Pattern 2 - pink, yellow, black
    • Pattern 3 - white 

    The multi-select list box is connected to a sharepoint list that contains a very long list of patterns (>50) so it may be hard for someone if they don't know which pattern they need already. To make it easier, I want to build a search function where the user searches for the colour and returns the pattern. Then the user can click "Select" and the correct pattern in the multi-select list box gets selected automatically instead of having the user to scroll through the whole list.

    I was able to build that search function using filtered repeating table, but I'm not sure how to select the pattern using the search result. For example, if I want white and red, I'll search for white, the search returns "Pattern 3", and I can click "select" to have it checked in the multi-select box. Then I'll search for red, and the search returns "Pattern 1", and I will click "select" again and also have it checked in the multi-select list box.  

    Is this a possibility?

    Thanks. 

  • 01-10-2017 07:54 AM In reply to

    Re: Set mutiple items to TRUE/FALSE in Multi-select List box

     The thing is, a multi select doesn't set items to true / false. A multi select is bound to a repeating field. When the user selects an item, InfoPath adds an instance of the node and sets the value to the value of the selected item. Open up one of your XML files in a text editor and you'll see this. I can't imagine any way to do what you want without code.

    Hilary Stoupa

  • 01-11-2017 07:37 AM In reply to

    Re: Set mutiple items to TRUE/FALSE in Multi-select List box

    Thank you, Hilary.

    I am able to set one value to the multi-select list box and it'll check that item. I've tried concatenating to create something like "value1; value2" hoping that both will be checked, but it doesn't seem to work. 

    I guess there is no way to set value to "mimic" adding a node to the repeating field?


  • 01-11-2017 07:45 AM In reply to

    Re: Set mutiple items to TRUE/FALSE in Multi-select List box

    Not without code - InfoPath doesn't support adding instances of a node via rules. You could have a bunch of nodes present by default and maybe use some rules to work around it - but I can't think of any way to do that off-hand.
    Hilary Stoupa

  • 01-11-2017 07:58 AM In reply to

    Re: Set mutiple items to TRUE/FALSE in Multi-select List box

    Thank you, that makes sense! 

Page 1 of 1 (5 items)
Copyright © 2003-2017 Qdabra Software. All rights reserved.
View our Terms of Use.