Infopath form, double eval statement with undeclared namespace error. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Infopath form, double eval statement with undeclared namespace error.

Last post 11-09-2017 08:10 AM by nolanfilm. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-07-2017 12:07 PM

    • edduval3
    • Not Ranked
      Male
    • Joined on 03-07-2017
    • Washington, D.C.
    • Posts 5

    Infopath form, double eval statement with undeclared namespace error.

    I have an InfoPath form with a secondary connection to a list with multiple fields.

    Based on a selection of a dropdown of the "Organization" field, I want to pull data from one field or another.   eg.  if they pick DAOM from a dropdown on the MAIN, I want to grab the value of a field called DAOM from the secondary list. 

     

    1)  in the statement below, if I  replace the concat section with 'concat("d:","DAOM")', it will do the lookup properly. 

    2) If I remove the single quote from concat statement it will pull data from the proper field but will not compile.

     3) If I leave the single quote in as displayed, the form will compile, but I get an error message that says:  msxml6.dll    Reference to undeclared namespace prefix: 'my'.  Error occurred during a call to property or method 'Eval'.

     

      eval(eval(SharePointListItem_RW[ID = TeamName and contains(AssignmentType, "Org")], 'concat("d:", xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Organization)'), "..")

     

    can you give me a clue how to make the statement work AND compile?  thanks in advance!! 

  • 03-07-2017 03:43 PM In reply to

    Re: Infopath form, double eval statement with undeclared namespace error.

    Oh, this is interesting - but I don't think InfoPath is going to do this. I think you will have to have multiple rules to set this field to the double eval you want, based on the selection in the dropdown. So, on the dropdown field, if the user picks DAOM, you'll have the double eval use d:DAOM in the concat piece, and if they select the other value, you'll use that. More of a pain, having to write multiple rules - but because this portion is passed in as a string, it isn't going to evaluate the XPath to return the actual field value.
    Hilary Stoupa

  • 03-08-2017 03:24 AM In reply to

    • edduval3
    • Not Ranked
      Male
    • Joined on 03-07-2017
    • Washington, D.C.
    • Posts 5

    Re: Infopath form, double eval statement with undeclared namespace error.

     Thanks Hilary!  My only problem is my dropdown has about 60 choices, that is a lot of rules!  I think I will normalize the list and do a match at the record level.

    My struggle there is I don't have access to repeating tables through browser forms, so visualizing the setup of the secondary source form is problematic. 

     

    By the way, I am a huge fan!  Your posts have saved me over and over again.

     

  • 03-08-2017 03:58 AM In reply to

    • edduval3
    • Not Ranked
      Male
    • Joined on 03-07-2017
    • Washington, D.C.
    • Posts 5

    Re: Infopath form, double eval statement with undeclared namespace error.

     At the risk of confusing the issue...I am setting up a tracking system which has teams and correlating assignments.

    There is one person per organization assigned.  That organization may be a state office.   Based on the assignment type I need to return the appropriate person to assign.

    I was hoping my shortcut would allow me to pick the correct field based on the dropdown selection.  Thanks again for your help.

     

     

  • 03-08-2017 07:16 AM In reply to

    Re: Infopath form, double eval statement with undeclared namespace error.

     Hey - I'm confused by this statement:  I don't have access to repeating tables through browser forms

    What do you mean by that? You can have repeating tables in browser forms....

    PS > glad some of my posts have been helpful! I learned InfoPath on this forum from Greg Collins' posts, so it is always great to hear I've been able to pay that back a bit. 

    Hilary Stoupa

  • 03-17-2017 06:00 AM In reply to

    • edduval3
    • Not Ranked
      Male
    • Joined on 03-07-2017
    • Washington, D.C.
    • Posts 5

    Re: Infopath form, double eval statement with undeclared namespace error.

     I am using Microsoft 365 InfoPath 2013.  The only repeating fields functionality I can find is in the people/group section.

    Everything I can find about repeating tables does not apply to web forms.

    I can insert a repeating table and it looks to connect to an external data source, but have no options to create a group in my data.

    I do not have any ability to set up a group nor any repating controls

    I'm sorry, must be pretty dense. 


      

  • 03-17-2017 07:19 AM In reply to

    Re: Infopath form, double eval statement with undeclared namespace error.

     Your screenshot still doesn't show - but I'm wondering - maybe you are working with a SharePoint List form? Those are different from "regular" browser forms. You can always attach your screenshot or form file under the Options tab in a reply.

    Hilary Stoupa

  • 03-17-2017 07:34 AM In reply to

    • edduval3
    • Not Ranked
      Male
    • Joined on 03-07-2017
    • Washington, D.C.
    • Posts 5

    Re: Infopath form, double eval statement with undeclared namespace error.

     I think you hit it on the head.  I am working with a list form rather than a "regular browser form". 

    I will explore switching my type of form.  I used to do the local InfoPath forms and used repeating fields all the time.

    When the browser forms came out, they told us the browser forms wouldn't support repeating fields, but that was a number of years ago.

    I never thought to question it or revisit the issue.  Thanks for bringing this to my attention!!! 

     

  • 11-09-2017 08:10 AM In reply to

    Re: Infopath form, double eval statement with undeclared namespace error.

    Hello,

    I don't know if this helps, but I am able to pull email based on a look up table and a (Drop Down field) of different user Groups from a SharePoint List form using InfoPath Double Eval function.

    Here is what I have (this is with the Edit Xpath (Advanced) checked)  ...

      xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("BA Group Selections")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:BAContact/pc:Person/pc:AccountId[xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:BusinessAnalysisGroup0 = ../../../d:ID], 'concat(substring-after(., "membership|"), ";")'), "..")

    Here is a screenshot without the Edit Xpath (Advanced) checked.

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