A question about XML Schema and InfoPath ? - InfoPath Dev
in

InfoPath Dev

A question about XML Schema and InfoPath ?

Last post 06-12-2007 09:03 AM by hugs4thetrees. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-07-2007 11:05 AM

    • vs2k9
    • Not Ranked
    • Joined on 02-27-2007
    • Benin
    • Posts 3

    A question about XML Schema and InfoPath ?

    HI Experts,

    I've just found this Website - A real world of InfoPath. And hope Experts can help me as much as possible.

    I have a schema file (*.xsd include 2 Elements have the same name but have the different Sub Elements, 2 Elements have the different level)

    For EX: 1st Element: Book(ISBN,Author,Title,Publisher) with level 3

    2nd Element: Book(ISBN,Author,Title,Publisher,DatePublish,Price,PageNumber) with level 5

    I can design this xsd file, and I need It is schema.

    In VS2005: 2 elements will be treat like 1 elements with name "Book". And Sub Elements of this new Element include union of Book (1st) and (Book (2nd)).

    When I use this schema( or XML file) like a datasource of InfoPath form, It will treat like it and It will Reference both.
    So when I design Form with InfoPath, and Export( save as ...xml file) I will have a new xml file. It's different from My Standard XML ( or XSD file) using for DataSource in InfoPath form.

    My purpose is use InfoPath to export Standard XML file (with some data ).

    So What Will I have to do ?
    - To use InfoPath to design Form with My Standard schema as save as... with the same schema ?

    - If I can't and Only have the new XML file from InfoPath, What will I have to do to use this new XML file and make it suitable with the old ( but standard XML) ????

    - ANd If I have an XML file ( with data ) How can I import this XML file to the InfoPath form I Designed and the data will present in My Form ?

    Thank you so much. And Please Answer my question as soon as possible, and as much detailed as possible.

    Thanks again.
  • 03-08-2007 09:35 AM In reply to

    Re: A question about XML Schema and InfoPath ?

    Let me hopefully answer at least one of your questions...
    XML Schema allows you to have the same element name "Book" with different sub elements. InfoPath also supports this when starting your form from an external schema. However, when designing your schema within InfoPath, references are used, and so once you have used the name "Book", all instances of "Book" will be identical (as they are all references to the single definition.

    So if you want to have multiple definitions using the same name, you will need to design your schema external to InfoPath and then use it when creating your form. Otherwise, you will need to use different element names: "Book1", "Book2", etc.

    Does this make sense?
  • 06-12-2007 07:51 AM In reply to

    Re: A question about XML Schema and InfoPath ?

    My issue falls along this line... 

    I had 2 fields called Category (in 2 different tables).  I changed the one in my secondary data source to CategoryName. It populates the drop down box for the Category field in the Main connection but when I try to submit data to the main table using the Main connection it says:

    InfoPath cannot submit the form.  An error occurred while the form was being submitted.  [0x80040E38][Microsoft Cursor Engine] Row cannot be located for updating.  Some values may have changed since it was last read.

    I've updated all my connections after I changed the name and even started over but always get this error.  Seems it won't accept the fact that the drop down is populated by CategoryName from the secondary data source but it being submitted (bound) to the field Category in the Main data source.  Is there a way to fix this?

    Filed under:
  • 06-12-2007 09:03 AM In reply to

    Re: A question about XML Schema and InfoPath ?

    I worked around it by basing the Category drop down on a query instead of the table.  In the query I included a field called CategoryName & a field called Category and filtered it.  I based the drop down on the query connection and the entries on the query.  I based the value & display name on Category instead of CategoryName & it works fine.

    I'd still like to know if there's an easier way around this if anyone knows.

    Thanks!

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