concat names from person/group picker control in repeating section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

concat names from person/group picker control in repeating section

Last post 09-05-2015 11:55 AM by chriskdixon. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 03-26-2015 08:46 AM

    concat names from person/group picker control in repeating section

     Hi - I am hopelessly trying to follow the other posts for concatenating multiple text strings from a repeating section but keep getting errors. I am using the Person/Group Picker as my control in the repeating section and I want to concatenate the DisplayName so I can get a list of people to email. I used the following formula with no luck. What am I missing?

     

    xdMath:Eval(xdMath:Eval(my:group1/my:group2/my:group/pc:Person, ‘concat(my:group1/my:group2/my:group/pc:Person/pc:DisplayName, “;”)’), “..”)

     

    Thanks for the help!

     Jennifer

  • 03-26-2015 08:54 AM In reply to

    Re: concat names from person/group picker control in repeating section

    xdMath:Eval(xdMath:Eval(my:group1/my:group2/my:group/pc:Person, ‘concat(pc:DisplayName, “;”)’), “..”)

    Looks like you selected DisplayName from the field picker instead of just typing it in... try this?

    Hilary Stoupa

  • 03-26-2015 08:59 AM In reply to

    Re: concat names from person/group picker control in repeating section

    Thanks for the quick response Hilary!  

     I tried and I'm still getting this error...

     

    Unexpected character.
    xdMath:Eval(xdMath:Eval(my:group1/my:group2/my:group/pc:Person, -->‘<--concat(pc:DisplayName, “;”)’), “..”)

  • 03-26-2015 09:07 AM In reply to

    Re: concat names from person/group picker control in repeating section

    Yeah - the quotes got turned into "smart" quotes somewhere in the copy paste process, just update all the ' and " in the formula. See how they are all slanted?

    Hilary Stoupa

  • 03-26-2015 09:23 AM In reply to

    Re: concat names from person/group picker control in repeating section

     Thanks! Seems so obvious now that you point out the slanted quotes.

     

    No luck but now have a different error.

     

    msxml6.dll
    Reference to undeclared namespace prefix: 'pc'.


    Error occurred during a call to property or method 'Eval'.

  • 03-26-2015 09:26 AM In reply to

    Re: concat names from person/group picker control in repeating section

    http://www.mattjimison.com/blog/2012/03/08/infopath-reference-to-undeclared-namespace-prefix-pc/ suggests sometimes you have to close and re-open IP after adding the people picker for it to realize you do have that namespace in the form? Maybe try that?

    Hilary Stoupa

  • 03-26-2015 09:32 AM In reply to

    Re: concat names from person/group picker control in repeating section

    Hilary - You are the bomb! Thank you so much!

    It works perfectly now.

  • 03-26-2015 09:44 AM In reply to

    Re: concat names from person/group picker control in repeating section

    Woot! Glad you have it doing whatcha' need. :)

    Hilary Stoupa

  • 09-05-2015 10:57 AM In reply to

    Re: concat names from person/group picker control in repeating section

     

     Hello Hilary,

     

    I'm having a similar problem I place this xdMath:Eval(xdMath:Eval(my:To/pc:Person, 'concat(pc:DisplayName, ";")'),"..") and I get "my:To/pc:Person" does not point to a valid location path of a field or group. Can you assist me if figuring this out?

     

    OR

     

    If you can assist me in achieving what I'm ultimately trying to accomplish which is to gather the email address(es) from the people/group picker field. Currently, I got it where if a user inputs information in a text field then that initiates an Action rule with condition set to None and Set a field's value: EmailTo (AnotherTextbox) to substring(xdMath:Eval(xdMath:Eval(../my:To/pc:Person/pc:AccountId, 'concat(";", .)'), ".."), 2). This sets EmailTo a textbox to DOMAIN\User; DOMAIN\User;....

    EmailTo (a textbox field) runs an Action rule on itself condition set to None and Set a field's value:EmailTo to  translate(., "DOMAIN\", " ") and results are for example USER; USER;... if multi users are selected, but if it's a single user then USER (Without Semicolon) There are two problems if the user goes back to add additional users then the EmailTo field does not get updated, unless the textbox that starts the chain reaction changes too. If the person/group picker field allowed Action rules I could avoid using another field as the trigger. Hence, the reason I need a text field that Refreshes with this code xdMath:Eval(xdMath:Eval(my:To/pc:Person, 'concat(pc:DisplayName, ";")'),"..") capture updates to the field.

    When publishing a person/group field  to a SharePoint site it only capture the first user and I need it to capture all users inputted in the person/group picker field and email the users selected via workflow.

    I also had a problem that if it was one user in the person/group picker field the user does not get the email when there is no semicolon(;) after the username. So, I created a rule on the Submit button that if EmailTo does not contain ; it then concat( EmailTo,";") then the user gets the email.

    In addition, I've tried  using this xdMath:Eval(xdMath:Eval(../my:To/pc:Person, 'concat(../my:To/pc:Person/pc:AccountId, ";")'), "..") but I get this error: "../my:To/my:To/pc:Person/pc:AccountId" does not point to a valid location path of a field or group. 

     

    Thanks Chris 

  • 09-05-2015 11:55 AM In reply to

    Re: concat names from person/group picker control in repeating section

     Updated

     

    Hilary,

     

    I figured it out. I was making it to complex . it quite simple

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