Sharepoint: Mutiple Selection Listbox (populated by data connection) - writing filtered values to text field - InfoPath Dev
in

InfoPath Dev

Sharepoint: Mutiple Selection Listbox (populated by data connection) - writing filtered values to text field

Last post 10-22-2012 03:58 PM by brentward. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-22-2012 11:33 AM

    Sharepoint: Mutiple Selection Listbox (populated by data connection) - writing filtered values to text field

    I have an InfoPath 2010 form (SharePoint 2010 - web based) with a multiple selection listbox that displays countries populated from a SharePoint list.

    This list has the following fields/values sample data:

    Country: United States
    Name: Joe Smith (this is a person picker field)
    ---------------------------
    Country: Canada
    Name: Steve Jones

    The Issue:
    When multiple countries are selected, I want to retrieve all of the matching Names (person picker) values and append them to either a text field (semi-colon delimitted) or person picker field(whatever will allow SharePoint to use the field to send e-mails in a workflow later). So if both Canada and United States are selected I want to return "Joe Smith;Steve Jones".

    What I have tried:
    1. I have been able to create a repeating table that has a "hide this control" rule. This is working fine, however, how can I extract the visible names from the repeating table and write them to a text/person picker field for use by SharePoint?
    2. I have also tried to add a rule that when the country field changes to populate a text field with the matching Person for each country... it only returns the first name.

    Any help would be appreciated.

    Thanks,
    Brent
  • 10-22-2012 03:58 PM In reply to

    Re: Sharepoint: Mutiple Selection Listbox (populated by data connection) - writing filtered values to text field

    I was able to get it to work with a Text field by using this default formula:

    eval(eval(DisplayName[Country = Value], 'concat(., substring(";", 1, string-length(.)), " ")'), "..")

    Country being from the list (data connection) and Value being the Multiple Selection Listbox country. This places a semi-colon between each name associated with the selected country.

    The SharePoint workflow now uses this text field to send an e-mail.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.