saving editions in Infopath 2013 works fine for all views except one - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

saving editions in Infopath 2013 works fine for all views except one

Last post 04-27-2018 07:47 AM by Takele. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-30-2018 09:47 AM

    saving editions in Infopath 2013 works fine for all views except one

    Hello 

    I wanted to edit a form in InfoPath 2013. The form has multiple views. The edits work fine in all views except in one. I usually check my edits in a preview before publishing it. The error I got when I tried to see the changes in a preview was like this:

    "

     InfoPath cannot open a new form.

    The form template is not valid.  

    InfoPath cannot open the following view: Inspection Report
    The following view file is not valid: view1.xsl
    The .xsl file is not valid XSL.
    A reference to variable or parameter 'uniqueItems' cannot be resolved.  The variable or parameter may not be defined, or it may not be in scope.

     " 

    Filed under: ,
  • 03-30-2018 03:01 PM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    I'd guess you have a dropdown control that has display unique items selected, and the data connection used for the dropdown is somehow a problem. Can you check your dropdown properties?
    Hilary Stoupa

  • 03-30-2018 03:07 PM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    Hilary Stoupa:
    Can you check your dropdown properties?
     

    What should the properties look like?  

  • 03-30-2018 03:14 PM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    I'd make sure none of the data sources have an issue. Feel free to attach a copy of the form to a reply, under the options tab, if you'd like me to take a look.
    Hilary Stoupa

  • 04-05-2018 10:59 AM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    Hello Hilary,

    I am not making any change where there is a drop-down.

    What I am doing is that I load the existing form  up in edit mode, click Preview, and it works absolutely fine - no problems.

    BUT, if I change so much as a single character anywhere in the form (in a design mode), it will not allow me to preview it again in one View. It works fine on the other Views.

    Instead I get this error 

    "

     InfoPath cannot open a new form.

    The form template is not valid.  

    InfoPath cannot open the following view: Inspection Report
    The following view file is not valid: view1.xsl
    The .xsl file is not valid XSL.
    A reference to variable or parameter 'uniqueItems' cannot be resolved.  The variable or parameter may not be defined, or it may not be in scope.

     "  

  • 04-05-2018 02:33 PM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    Yes, you've posted your error before. I think the 'uniqueItems' is referring to a drop down control. You may want to save your form as source files and look for that in the view.xsl. Feel free to attach a copy in a reply under the options tab if you'd like me to take a look.
    Hilary Stoupa

  • 04-05-2018 03:10 PM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

     Ok, thanks. I do see this:

     

    <xsl:variable name="items">
                     <xsl:copy-of select="xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/d:Storage"/>
                    </xsl:variable>
                    <xsl:variable name="uniqueItems" select="msxsl:node-set($items)/*[not(@ID = preceding::d:Storage/@ID)]"/>
                    <xsl:for-each select="$uniqueItems">
                     <option>

     

     

  • 04-09-2018 07:52 AM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    Feel free to attach a copy of your form to a reply under options if you'd like a hand. I'd assume that you should, in design mode, take a look at the properties on this drop down - make sure the data connection and XPath filter for the data source are correct. You could even take a copy of the form, try deleting the drop down from the view and see if that resolves the issue, then recreate it.
    Hilary Stoupa

  • 04-27-2018 07:47 AM In reply to

    Re: saving editions in Infopath 2013 works fine for all views except one

    I solved it by first extracting the code from the InfoPath form. Then, I opened the "View" from the extracted files using Notepad+++ and searched for the word "unique items" that showed in the error message. This helped me to find out which field is associated with this error.

    As you mentioned it, it is related with the property of the drop-down option. The solution was in stead of getting the values from the external data source, I just typed the values by selecting "Enter choices manually" in the "List box choices". I had only 3 data values to type and was not time consuming.

     

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