Double Eval fails "reference to undeclared namespace prefix pc" - InfoPath Dev
in

InfoPath Dev

Double Eval fails "reference to undeclared namespace prefix pc"

Last post 11-26-2017 10:24 AM by KTerry. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 06-28-2016 06:17 AM

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Double Eval fails "reference to undeclared namespace prefix pc"

    Hi, I'm trying to using the double eval as mentioned in numerous posts, to pull multiple email addresses from a people picker. Using this formula it fails with the above error. Could anyone assist on this? It's driving me crazy!

    eval(eval(Person, 'concat(../../my:group_1/pc:Person/pc:AccountId, ";")'), "..")

  • 06-28-2016 08:19 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    If you picked "Person" with the field or group picker, I'd think your formula would be: eval(eval(Person, 'concat(pc:AccountId, ";")'), "..")
    Hilary Stoupa

  • 06-29-2016 11:02 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

     Hi Hillary,

    I got this KIND of working, but now with strange results.   Here is the formula again, and the results.  

    People Picker Selection -  "Darcy Wilson; Kevin Lambert; Peter Scott" 

    Formula -  "eval(eval(Person, 'concat(../../my:group/pc:Person/pc:AccountId, ";")'), "..")"

    Result  -  "i:0#.f|membership|[email protected];i:0#.f|membership|[email protected];i:0#.f|membership|[email protected];"

     Now I know the stupid i:0#|membership stuff is the result of SharePoint 365.  Though I have no idea how I can clean that up to have JUST the email address.  But the bigger question is why I don't get three different results? 

  • 06-29-2016 11:09 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Your formula is still wrong. You are not using a relative path to the AccountId node - that is why you don't get three different results. What happened if you just use "pc:AccountID" like I suggested? "eval(eval(Person, 'concat(pc:AccountId, ";")'), "..")"
    Hilary Stoupa

  • 06-29-2016 11:25 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

     Oops, yes, I do see that this appears to fix the issue.  Thanks for that! 

    Is there a simple way now to remove all the garbage from the result, so I can then using that result for an email form submit? 

  • 06-29-2016 11:35 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    I think so - I think you can use a substring-after function: eval(eval(Person, 'concat(substring-after(pc:AccountId, "membership|"), ";")'), "..")
    Hilary Stoupa

  • 06-29-2016 11:45 AM In reply to

    • Sailor
    • Top 75 Contributor
    • Joined on 09-15-2009
    • Canada
    • Posts 107

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

     You are so wonderful! Thank you again for all the assistance you provide!

  • 11-20-2017 09:47 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Hi Hilary - I believe I have the same issues, but need your help. What information can I send you so that you can help me through this issue? Please let me know. I really need to solve this issue soon. Thanks, Kellie
  • 11-20-2017 12:06 PM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Can you attach your template under the Options tab in a reply & let me know a few more details? Are you using double eval and running into the same error?
    Hilary Stoupa

  • 11-21-2017 12:40 PM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Hi Hilary - I've attached the file. All I want to do is have the People Picker validate the email address and then send the form to whomever is added to the people Picker.
  • 11-21-2017 03:55 PM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    You probably just need a formula in your "E-Mail" field then as a default. In your form, set the fields task pane to display in advanced view. Drag the data source for the "pc:Person" group (inside "smart email") onto the form as a repeating table. Preview your form and pick a user with your people picker - the account id field will have the account info. You will likely need to use a substring-after formula to get just the email back - like this: (substring-after(pc:AccountId, "membership|"), but selecting the pc:AccountId field using the field picker.
    Hilary Stoupa

  • 11-26-2017 06:35 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Hi Hilary - This is still not working. Can I set up a quick WebEx to show you where I'm getting stuck? Thanks, Kellie
  • 11-26-2017 10:24 AM In reply to

    Re: Double Eval fails "reference to undeclared namespace prefix pc"

    Hi Hilary - I was able to get it working. Thanks so much for your help! Kind Regards, Kellie
Page 1 of 1 (13 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.