Look up values in the form's data source - InfoPath Dev
in

InfoPath Dev

Look up values in the form's data source

Last post 04-04-2005 02:16 AM by Shanthi Reddy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-17-2005 09:07 AM

    Look up values in the form's data source

    I am trying to use the "Look up values in the form's data source" feature of a Drop-Down List, but I always get the following error:

    InfoPath cannot create a new, blank form.
    The form template is not valid.

    InfoPath cannot open the following view: View 1
    The following view file is not valid: view1.xsl
    The .xsl file is not valid XSL.
    Expected token ')' found '['.

    not(../..-->[<--@my:UniqueID=$val] or $val='')

    The referenced XSL is:
    <xsl:variable name="val" select="."/>
    <xsl:if test="not(../..[@my:UniqueID=$val] or $val='')">
  • 03-27-2005 04:50 PM In reply to

    Re: Look up values in the form's data source

    Can you give us the xml file that is being used in the solution and which field you are trying to bind to the dropdown?

    Shanthi
    InfoPathDev India
    Shanthi Reddy
  • 03-29-2005 03:52 PM In reply to

    Re: Look up values in the form's data source

    I believe that you cannot have a filter ([]) directly after a self (.) or parent (..) reference.

    You might try updating the XPath to something like the following:

    <xsl:if test="not(../..node()[@my:UniqueID=$val] or $val='')">


    Greg Collins [InfoPath MVP]
    InfoPathDev
  • 04-01-2005 02:17 PM In reply to

    Re: Look up values in the form's data source

    As far as I can tell, the problem is that I am using a data element as the source for a combo box which is bound to an element which is _contained_in_ the hierarchy of the source element.

    e.g.:
    schema:
    <items>
    <item>
    <name/>
    <item-id/>
    <references>
    <reference-id/>
    <reference-id/>
    </references>
    </item>
    </items>

    combobox bound to <reference-id>
    combobox data source specified as <item>
    using display: <name>
    using value: <item-id>
    xpath for selectable <item>s should be: "/items/item"
    actual xpath determined by InfoPath: "../../item"
  • 04-04-2005 02:16 AM In reply to

    Re: Look up values in the form's data source

    Hello timcoffman,
    I tried creating the same schema that you mentioned above and set the dropdown as you mentioned. The solution worked for me in preview. I had a repeating table for Items block and as i inserted new items, these new values were seen in the dropdown control.

    Is there anything that I'm missing? The xpath for the selectable item is "/my:myFields/my:items/my:item" in the solution that I just created

    Shanthi
    InfoPathDev India
    Shanthi Reddy
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.