Namespace error when using double eval - InfoPath Dev
in

InfoPath Dev

Namespace error when using double eval

Last post 08-30-2010 07:14 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-26-2010 03:55 AM

    Namespace error when using double eval

    Hi All -

     

    I have a repeating table made from a data connection to a sharepoint list:

    /dfs:myFields

        dfs:dataFields

            dfs:DSE_Security_Levels

                @User_Name

                @Centre_or_Department

                @Region

                @Security_Level

                @Status

    I am trying to create a field which concatenates the contents of the User_Name field above. I've done this on different forms and lists and it's worked fine. The formula I am using is:

    eval(eval(DSE_Security_Levels[@Security_Level = 1],'concat(@User_Name,";")'),"..")

    I've used the field picker to put the data connection name and filter in. When I verify the formula, i get:

    msxml5.dll
    Reference to undeclared namespace prefix: 'dfs'.
    Error occurred during a call to property or method 'Eval'.

    and the formula changes to:

    eval(eval(DSE_Security_Levels[@Security_Level = 1], 'concat(xdXDocument:GetDOM("DSE Security Levels")/dfs:myFields/dfs:dataFields/dfs:DSE_Security_Levels/@User_Name,";")'), "..")

    The full XPath of the formula is:

    xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("DSE Security Levels")/dfs:myFields/dfs:dataFields/dfs:DSE_Security_Levels[@Security_Level = 1], 'concat(xdXDocument:GetDOM("DSE Security Levels")/dfs:myFields/dfs:dataFields/dfs:DSE_Security_Levels/@User_Name,";")'), "..")

    It looks like the problem is with the User_Name field, but I can't see what it is. I've tried testing it by changing the data connection to another list which has worked before, but I still get this error.

    Does anyone have any ideas please?

    TIA

  • 08-30-2010 07:14 AM In reply to

    Re: Namespace error when using double eval

    Your formula doesn't really make sense the way it is. How's this?

    xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("DSE Security Levels")/dfs:myFields/dfs:dataFields/dfs:DSE_Security_Levels[@Security_Level = 1], 'concat(@User_Name,";")'), "..")

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.