Upgrade.XSL Bug??? - InfoPath Dev
in

InfoPath Dev

Upgrade.XSL Bug???

Last post 05-10-2007 12:44 AM by ahardin. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-28-2005 06:16 AM

    Upgrade.XSL Bug???

    I have been fighting an issue where my schema changed and added new fields. The new schema worked fine for new forms but any old form was opened and the new field was not enterable. I originally went down a path thinking that since the schema was created externally and imported into InfoPath that InfoPath couldn't deal with the upgrade as it didn't create the schema.

    I tried a quick sample app with a 2 field form with the schema being
    created in InfoPath. Then I added a new field and the new form exhibited the same result. The new field was enterable in new forms but was null and not enterable in previous forms. The Form Option was set to update the form automatically.

    I examined the upgrade.xsl file and found why this behaviour was happening. The xslt logic was that the <element> tag which inserts the field in the xml document, was within the <if> logic looking for the node in the xml document. The resulting action being that if the field was not in the xml document, it would not be added. By moving the <element> tag outside of the <if> logic for
    the tag and everything works as expected.

    Is this a bug? You can make a case that old forms are preserved as they were entered but it seems that you would want the ability to update an old form. Thoughts?
  • 04-28-2005 11:59 AM In reply to

    Usually if we want add more fields to schema we will add them as optional fields.
    If we want to enter values for these fields in the old forms,
    Then you need to have an optional section in the UI which is binded to the new field, properties for this section will be
    1. Include the control in the form by default.
    2. Allow users to delete the section.
    3. Show insert button and hint text.

    After this you will place your new field as a control(Textbox) in the above optional section.

    When you do this you will be able to insert the new field in the old form and your new form will have this field by default.

    Agni
    InfoPathDev India
  • 05-08-2007 11:30 AM In reply to

    Hi Andywt,

    I have same issue what you are facing.  However, couple of things are different in my case.  I am using InfoPath 2007 and I can't find upgrade.xsl any where like the way you specified.

    I will appreciate if you can let me know how you resolved this issue.

    Thanks

    Srini
     

  • 05-10-2007 12:44 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Hi

    There is an option in Tools - Form Options - Advanced Tab where you can specify the upgrade path.  If there are these type of issues then you can specify that "On version upgrade" Run Code OR, the one i prefer "Automatically update existing forms".  This works a treat showing the new fields added in ALL forms.

    I hope this helps

    Adam

    I'm from WALES
    [email protected]
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.