Changing the content type assigned to an existing set of documents - InfoPath Dev Sign in | Join | Help in Qdabra Database Accelerator Qdabra Software Product Support (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » Qdabra Software Product Support » Qdabra Database Accelerator » Changing the content type assigned to an existing set of documents Changing the content type assigned to an existing set of documents Last post 12-05-2011 12:44 AM by GedCT. 14 replies. Page 1 of 1 (15 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 12-13-2010 02:43 AM GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Changing the content type assigned to an existing set of documents Reply Contact Dear all, I've recently inherited a project whereby a single, complex form was being used to capture data where a number of smaller, better targeted forms would have been better. I therefore intend to split the form down into five or six new data collection forms and create new content types within DBXL. However, there are already a sizeable number of documents already within DBXL against the content type I want to replace. Once I have created the new document types, is there a tool available that will allow me to select existing DBXL documents and to move them to the new, more appropriate content type? Accepting that I also need to change the form with which the data file is associated within SharePoint. Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited 12-13-2010 07:54 AM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hello Ged, How many forms would you say you have at the moment? Our Migration Tool utility for DBXL 2.4 has a feature that allows you to apply an XSL transform to forms while copying them from one document type to another. You can use this to convert your existing forms to different XML formats as you copy them to these new document types. The caveat here is that the feature at present doesn't allow selecting certain forms, so you would have five or six doctypes each with the same number of forms as your original doctype. There are certainly ways around this if need be. Please let us know a bit more about your situation, and we will do our best to come up with a solution. Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 12-13-2010 10:16 AM In reply to GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hi Jimmy, The single big form will ultimately be broken down into four smaller ones with some overlap of data collection between each. The larger form uses conditional formatting to hide some form elements depending upon options set on the opening page. Therefore, not all of the data fields are completed for each study and it's fine to lose those that are not required as we make specific forms for each branch. Ged Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited 12-15-2010 07:16 PM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hello again and sorry for my delayed response, When I asked how many forms you have at the moment, what I was trying to ask was how many actual XML files (documents) you have in this original doctype that you want to split out into smaller ones. Sorry for not being clearer. As I said, we have a feature for downloading all of the forms in a doctype, converting them to another format, and re-uploading them to a separate doctype, which I believe is essentially what you're looking to do, but the drawback is that this doesn't have any sort of filtering at the moment. i.e. if your original doctype has 300 forms, and you're splitting it into 4 new doctypes, you would wind up with 300 forms in each of those new doctypes. You could go in afterward and delete any extraneous ones afterward, but that might be unfeasible depending on how many you have. If you don't mind having the extraneous forms in DBXL, you could configure your DB mappings or SharePoint mappings to ignore any unnecessary forms. Anyway, please let me know what your thoughts are about what I've said so far. Thanks! Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 12-15-2010 09:58 PM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hi Ged, DBXL also has a Convert function that you can call to save an XML as a separate doctype. You could add a button to your form that calls the Web Service and converts the existing XML into a new doctype but the schema of the current XML must be forwards compatible with the schema for the target doc type you are converting to. The method Jimmy describes above is more powerful and allows for custom conversions. Thanks, Patrick HalsteadProject Manager at Qdabra 12-15-2010 11:58 PM In reply to GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Sorry for the confusion - I have 250 existing documents that need to be split unequally amongst four new doctypes and so the feature you describe sounds exactly what I'm looking for and more than happy to remove those that are no longer required. Would this automatically link them to the replacement XSN templates that I'll be creating for each file type, as there will be additional data fields in the single form that are not required in the revised and split forms? Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited 12-16-2010 04:49 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact As long as the additional data fields are not required, you should be ok. We have a blog post on this... let me check ... Patrick HalsteadProject Manager at Qdabra 12-16-2010 07:21 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hi again, Can you look at the following document and let us know if you have questions: http://www.infopathdev.com/files/folders/miscellaneous/entry42096.aspx Thanks! Patrick HalsteadProject Manager at Qdabra 12-16-2010 08:37 AM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Please also have a look at this tutorial, which is the mechanism I've been describing: http://www.infopathdev.com/files/folders/other_topics/entry56229.aspx Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 03-28-2011 12:11 AM In reply to GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Apologies for the delay in responding to this, but I managed to use some of the methods to migrate documents into new file types, but only where their old template matched their new template. If I try to convert the template containing all possibilities into one of the new ones that supports just a single sub study then it converts the document, but when I try to open it a dialogue box informs me of an error and says: The form is a newer version than the current form template. I also appear to have duplicated some of the document types when converting the application to v2.4 and hence I now have document types which are redundant, but cannot be removed using the document migration tool which I downloaded. Is there a relatively easy way in which I can remove the document types that I no longer need and their associated documents. Basic mistake, I didn't migrate the configuration files and so had to create new document types to important the documents into! Ged Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited 03-28-2011 06:04 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Hi Ged, Sounds like there was a problem with the way you were doing the conversion. The new doctype should always have a greater version number. Not sure if the docs pointed that out or not ... Regarding your doctype duplication issue, you can delete the doctypes from DAT. On the main catalog page there's a delete button to the far right. Please be very careful about deleting things and make sure you have taken backups etc. We generally don't recommend deletion but if you must do it, there is a way. Patrick HalsteadProject Manager at Qdabra 03-28-2011 07:11 AM In reply to GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Thanks Patrick, I've tried to delete the document type from the Administration Tool and also from the Document Migration Tool, but to no avail. If I click on the number in the docs column, I get an error that says: I9999: An unhandled exception was thrown: Object reference not set to an instance of an object. I assume that's because the configuration files weren't backed up and hence some referential link has been lost. I want to remove all the documents for the document type and the document type itself, as the dashboard is getting crowded the more trials we put through the system and it's confusing to have similarly named document types. My own fault that it's occurred, but wondered if there was a way to remove them. Just checking the doctype information ... Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited 03-28-2011 07:24 AM In reply to Patrick Halstead Joined on 08-08-2006 Posts 5,112 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact I believe we published a blog on this a while back with instructions on how to clean up the cross reference tables. Let me check with Ernesto to find out where it is... Patrick HalsteadProject Manager at Qdabra 03-29-2011 01:56 PM In reply to ErnestoM Joined on 08-27-2007 Posts 3,320 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Perhaps this is the document mentioned above? http://www.infopathdev.com/files/folders/other_subjects/entry74141.aspx Ernesto MachadoQdabra® Software/ InfoPathDev.comThe InfoPath Experts – Streamline data gathering to turn process into knowledge.™ 12-05-2011 12:44 AM In reply to GedCT Joined on 01-27-2010 Chesterfield & Leeds, UK Posts 52 Re: Changing the content type assigned to an existing set of documents Mark as Not AnswerMark as Answer... Reply Contact Sorry, I've only just found the time to re-visit this. I've tried to run the script documented, but it tell me the 'DocumentType' object is invalid. I also cannot remove any shredding connection strings, as I'm unable to selec the document type that I want to remove. I can successfully export the documents currently connected to that document type using the DBXL Migration Tool which to me indiciates the documents are still within the database and correctly linked to that document type somewhere.I want to remove the document type and all linked documents from the database, as I now have a newer document type that I'm using. It's just housekeeping really, as it doesn't affect the operation of the system, but would be nice to know how I could do this.Having found the DocumentID of the Document Type that I want to delete, is it possible to use this to compile a list of all DocumentIDs of all the forms that I want to remove and delete this from the relevant tables within the database? I've checked the Document table and the Document Type and all related documents are still there, but I can't work out how to query the XRef table, as I can't see mention of these anywhere in there. Ged Connolly-ThompsonSenior Business Systems AnalystLeeds Musculoskeletal Biomedical Research UnitLeeds Institute of Rheumatic and Musculoskeletal MedicineDirector2and7 Limited Page 1 of 1 (15 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Dear all,
I've recently inherited a project whereby a single, complex form was being used to capture data where a number of smaller, better targeted forms would have been better. I therefore intend to split the form down into five or six new data collection forms and create new content types within DBXL.
However, there are already a sizeable number of documents already within DBXL against the content type I want to replace. Once I have created the new document types, is there a tool available that will allow me to select existing DBXL documents and to move them to the new, more appropriate content type? Accepting that I also need to change the form with which the data file is associated within SharePoint.
Hello Ged,
How many forms would you say you have at the moment? Our Migration Tool utility for DBXL 2.4 has a feature that allows you to apply an XSL transform to forms while copying them from one document type to another. You can use this to convert your existing forms to different XML formats as you copy them to these new document types. The caveat here is that the feature at present doesn't allow selecting certain forms, so you would have five or six doctypes each with the same number of forms as your original doctype. There are certainly ways around this if need be. Please let us know a bit more about your situation, and we will do our best to come up with a solution.
Hi Jimmy,
The single big form will ultimately be broken down into four smaller ones with some overlap of data collection between each. The larger form uses conditional formatting to hide some form elements depending upon options set on the opening page. Therefore, not all of the data fields are completed for each study and it's fine to lose those that are not required as we make specific forms for each branch.
Ged
Hello again and sorry for my delayed response,
When I asked how many forms you have at the moment, what I was trying to ask was how many actual XML files (documents) you have in this original doctype that you want to split out into smaller ones. Sorry for not being clearer.
As I said, we have a feature for downloading all of the forms in a doctype, converting them to another format, and re-uploading them to a separate doctype, which I believe is essentially what you're looking to do, but the drawback is that this doesn't have any sort of filtering at the moment. i.e. if your original doctype has 300 forms, and you're splitting it into 4 new doctypes, you would wind up with 300 forms in each of those new doctypes. You could go in afterward and delete any extraneous ones afterward, but that might be unfeasible depending on how many you have. If you don't mind having the extraneous forms in DBXL, you could configure your DB mappings or SharePoint mappings to ignore any unnecessary forms. Anyway, please let me know what your thoughts are about what I've said so far.
Thanks!
Hi Ged,
DBXL also has a Convert function that you can call to save an XML as a separate doctype. You could add a button to your form that calls the Web Service and converts the existing XML into a new doctype but the schema of the current XML must be forwards compatible with the schema for the target doc type you are converting to.
The method Jimmy describes above is more powerful and allows for custom conversions.
Thanks,
Sorry for the confusion - I have 250 existing documents that need to be split unequally amongst four new doctypes and so the feature you describe sounds exactly what I'm looking for and more than happy to remove those that are no longer required.
Would this automatically link them to the replacement XSN templates that I'll be creating for each file type, as there will be additional data fields in the single form that are not required in the revised and split forms?
As long as the additional data fields are not required, you should be ok. We have a blog post on this... let me check ...
Hi again,
Can you look at the following document and let us know if you have questions: http://www.infopathdev.com/files/folders/miscellaneous/entry42096.aspx
Please also have a look at this tutorial, which is the mechanism I've been describing:
http://www.infopathdev.com/files/folders/other_topics/entry56229.aspx
Apologies for the delay in responding to this, but I managed to use some of the methods to migrate documents into new file types, but only where their old template matched their new template. If I try to convert the template containing all possibilities into one of the new ones that supports just a single sub study then it converts the document, but when I try to open it a dialogue box informs me of an error and says: The form is a newer version than the current form template.
I also appear to have duplicated some of the document types when converting the application to v2.4 and hence I now have document types which are redundant, but cannot be removed using the document migration tool which I downloaded. Is there a relatively easy way in which I can remove the document types that I no longer need and their associated documents. Basic mistake, I didn't migrate the configuration files and so had to create new document types to important the documents into!
Sounds like there was a problem with the way you were doing the conversion. The new doctype should always have a greater version number. Not sure if the docs pointed that out or not ...
Regarding your doctype duplication issue, you can delete the doctypes from DAT. On the main catalog page there's a delete button to the far right. Please be very careful about deleting things and make sure you have taken backups etc. We generally don't recommend deletion but if you must do it, there is a way.
Thanks Patrick,
I've tried to delete the document type from the Administration Tool and also from the Document Migration Tool, but to no avail. If I click on the number in the docs column, I get an error that says: I9999: An unhandled exception was thrown: Object reference not set to an instance of an object. I assume that's because the configuration files weren't backed up and hence some referential link has been lost. I want to remove all the documents for the document type and the document type itself, as the dashboard is getting crowded the more trials we put through the system and it's confusing to have similarly named document types. My own fault that it's occurred, but wondered if there was a way to remove them.
Just checking the doctype information ...
I believe we published a blog on this a while back with instructions on how to clean up the cross reference tables. Let me check with Ernesto to find out where it is...
Perhaps this is the document mentioned above?
Sorry, I've only just found the time to re-visit this. I've tried to run the script documented, but it tell me the 'DocumentType' object is invalid. I also cannot remove any shredding connection strings, as I'm unable to selec the document type that I want to remove. I can successfully export the documents currently connected to that document type using the DBXL Migration Tool which to me indiciates the documents are still within the database and correctly linked to that document type somewhere.
I want to remove the document type and all linked documents from the database, as I now have a newer document type that I'm using. It's just housekeeping really, as it doesn't affect the operation of the system, but would be nice to know how I could do this.
Having found the DocumentID of the Document Type that I want to delete, is it possible to use this to compile a list of all DocumentIDs of all the forms that I want to remove and delete this from the relevant tables within the database? I've checked the Document table and the Document Type and all related documents are still there, but I can't work out how to query the XRef table, as I can't see mention of these anywhere in there.