I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file? - InfoPath Dev
in

InfoPath Dev

I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

Last post 02-21-2012 07:59 AM by shniggens. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 02-17-2012 03:47 PM

    I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    I need to create some new tables in my form that are identical to other tables, but with different field an table names of course.  Would it be easier to do this by modifying the source files?

  • 02-18-2012 10:35 AM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Is the trouble you're trying to avoid the work of adding the fields to the data source, or that of setting up the controls in your form?  If it's the former, you can just use the Reference... option in the data source taskpane, but that would result in the new table having the same field names as the original.  Is that a problem?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-18-2012 01:13 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Yeah, I want to make creating the field in the datasource faster. I need new tables with the same schema as the table I am copying. They need to be separate tables, though, as I am going to conditionally copytable to them.
  • 02-18-2012 02:39 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    I see, so you want to reproduce a schema format from your secondary data source in your main data source, is that it?
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-18-2012 05:07 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Essentially.  I already have one table in my main data source created to copytable into.  I copytable from a secondary data source.  What I want to try (mostly for testing purposes), is creating up to 10 tables with the same schema in my main data source.  I will have 10 copytable commands that run on conditions.  So my main first table is Table1, for instance.  Then Table2, Table3, etc.   If Field1 = 'test', copy into Table1.  If Field2 = 'crazy', copy into Table2, etc. 

    So basically I need 9 more versions of the first table I created.  I know that sounds crazy, and you guys would probably advise against it, but I'm trying to test some things.  I was hoping I could extract the source files, edit the myschema file, copy the first table, and insert it below and rename the group, table, and fields (by just appending a number), save it, and viola!  But that didn't work. 

  • 02-19-2012 12:44 AM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    No need to tamper with myschema.xsd to do this.  Just do the following:

    Create your Table1 non-repeating group.  Then create a repeating group under that, and add your fields under the repeating group.

    Now create a Table2 non-repeating group.  Right-click the repeating group, select "Reference..." and select Table2 as the destination.

    Then repeat that second line as many times as you need.

    That's it!

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-19-2012 05:38 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    OK, cool, I see how that works.  It doesn't keep the field types, though.  Everything is 'string'.  Is that normal?

  • 02-19-2012 08:00 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    It should maintain the field types.  Did you set the original ones you created to something other than "string?"
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-19-2012 08:30 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Yes, some of them were boolean and integer fields.

  • 02-19-2012 10:30 PM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    That's odd.  They should be identical.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-20-2012 08:07 AM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Hmmm, something happened, and the original table DID NOT have field types.  No problem, though.  Once I changed the main one, all the others changed automatically.

    Is there a way to NOT include a blank row in the table by default?

  • 02-20-2012 08:18 AM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    Under the data tab in the ribbon you'll find a button for default values. You can deselect your repeating group to not include by default. (Tools / Default values in IP 2007, I believe).

    Hilary Stoupa

  • 02-21-2012 07:59 AM In reply to

    Re: I need to duplicate some large tables in my form, can I do it by modifying the myschema.xsd file?

    So by using reference tables, they are completely seperate tables?  Seems odd that they can have the same field names.  So I reference to group2/referencetable, I also have group1/referencetable, and group3/referencetable.  When I do a CopyTable to group2/referencetable, it's only going to iterate through that group's (group2) rows, correct?

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