Double Eval Method Failing - SharePoint List bound in Repeating Table - InfoPath Dev
in

InfoPath Dev

Double Eval Method Failing - SharePoint List bound in Repeating Table

Last post 11-28-2012 11:19 AM by MichaelPetri. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-27-2012 10:34 AM

    Double Eval Method Failing - SharePoint List bound in Repeating Table

    Hello!

    I have a problem that I cannot seem to solve.

    I have a secondary data source (SharePoint list) displayed in my web form as a repeating table.
    I am trying to use the double eval method to generate a semicolon delimited list of emails that are bound with the data.

    From the problems I have ran into today, it seems that this method only works in InfoPath repeating tables and not with external data.

    The formula I am using is:
    eval(eval(SharePointListItem_RW, 'concat(ProctorEmail, ";")'), "..")

    I verify the formula and it passes without errors. When I click Ok, the formula changes to:
    eval(eval(SharePointListItem_RW, 'concat(xdXDocument:GetDOM("ProctorStudents")/dfs:myFields/dfs:dataFields/ns1:SharePointListItem_RW/ns1:ProctorEmail, ";")'), "..")

    Then, when I close and try to preview, I get the following error message:
    msxml6.dll
    Reference to undeclared namespace prefix: 'ns1'.

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

    InfoPath assigned the namespace, so why is it not recognizing it?

    Should this be possible, or am I trying to take InfoPath beyond its limitations? I cannot use code, because this will be a web based form. I have attached a screen shot of the structure of my secondary data source.

    Additionally, the ultimate goal is to filter the email string based on ns1.ClassID = my:ClassID. I have that functionality working to hide records that do not meet that criteria via rules on the cells in the repeating table, and I thought it would be a snap to implement the same logic in the double eval method, however it appears (from my observations) that the double eval method only works on form objects.

    Help please?

    Thank you!
    Mike Petri
  • 11-28-2012 07:52 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    Hi Michael,

     I'm fairly sure that the double eval expression shouldn't have that full xdXDocument:GetDOM("ProctorStudents")... path inside the concat() function.  Please try deleting all of that portion except the ns1:ProctorEmail.

     With any luck, this namespace prefix error is just a red herring.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-28-2012 08:18 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    Thanks Jimmy! I did as you suggested and changed the formula to eval(eval(SharePointListItem_RW, 'concat(ns1:ProctorEmail, ";")'), "..") and the formula verified just fine, however when I previewed the form, it errored out:

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

    Error occurred during a call to property or method 'Eval'.
  • 11-28-2012 08:34 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    That is odd.  I couldn't say offhand why that is happening, but as a workaround, please try replacing the ns1:ProctorEmail part with this: *[local-name() = 'ProctorEmail']
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-28-2012 09:00 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    Exactly the same results. I tried the plain text you provided, I tried mapping ProctorEmail to the actual node (no validation errors) and every other combination I could think of.

    Same error.

    I exported the source and verified that ns1 is declared in the manifest xmlns:ns1="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields"

    Prospects for success not looking good at this point.
  • 11-28-2012 09:38 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    How about this:

    eval(eval(ProctorEmail, 'concat(., ";")'), "..")

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-28-2012 11:19 AM In reply to

    Re: Double Eval Method Failing - SharePoint List bound in Repeating Table

    Awesome. That was exactly what I needed.

    With your solution, I was able to apply a filter on the ProctorEmail field as well (my initial desired result).

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