Use SharePoint Designer Workflow to change an InfoPath Content Type? - InfoPath Dev
in

InfoPath Dev

Use SharePoint Designer Workflow to change an InfoPath Content Type?

Last post 05-21-2013 11:53 AM by rajkumar.bathula. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-05-2009 10:31 AM

    Use SharePoint Designer Workflow to change an InfoPath Content Type?

    Hi

    I've used InfoPath and SharePoint Designer (SPD) workflows in combination over the years but am now faced with the need to have a complete cloned set of data from one document, created into a separate document (same database), the tricky bit being that it needs to have a different Content Type as its primary template. In the past I've used different Views on the InfoPath form to achieve this, however this time is different; this time I need a truly different content type for the 'new' document.  The action needs to be initiated by an end-user via a button, so copying the document and giving it a new name wouldn't be a problem.

    Once the 'new' document has been added to the library, I can use an automatically invoked SPD Workflow to change the content type in the WSS / MOSS database side of things, but that doesn't change the location of the template (the href element of the data) in the XML, nor does it affect the ContentTypeID either, both of which (and more fields probably) are needed to reflect the 'new' position/template.  I'm also aware that the datasources and fields listed would be different as well so that messes things up.

    When I've messed up and changed things on templates in the past I've used the 'Relink' option on documents, and this is very effective and in some ways if I could find a similar capability to that somehow in the SPD side of things, then this would be great.

    One option would be (from a User's button press) to create a true new document from the 2nd content type, and then use InfoPath button functionality to copy all the data across, however there are about 200+ fields on the document and when I've tried copying that amount of data previously it kills the server and all looks hideous from a user's view.

    If anyone has any bright ideas how this could be achieved, or if there someone who has already done something to achieve the same result in other ways, I'd be very grateful to know how to tackle things.

    If this is an interesting one, but you need a bit more information or I didn't explain things well enough, please come back to me.

    Thanks in advance.  Alan C.

     

  • 08-07-2009 12:36 AM In reply to

    Re: Use SharePoint Designer Workflow to change an InfoPath Content Type?

    You should look at the Import functionality. In the InfoPath 2003 SDK there is a sample of how to use ImportFiles (or Merge Forms) to import forms of different schemas. You can do this without code but you'll need an XSL and XSD (which you already have) to transform and validate the incoming data. The XSL is the hard part but you can look at InfoPath 2003 sample forms Meeting Agenda and Issue Tracker to see an example - these are available from Office templates free downloads. Just install. Then go File->Save As Source. Look at the manifest.xsf file for both. In particular, in Meeting Notes, look at Issue Tracker lines in the ImportFiles section. I think it's ImportFiles but maybe it's ImportParameters... long night here ...

    Patrick Halstead
    Project Manager at Qdabra
  • 08-10-2009 01:11 PM In reply to

    Re: Use SharePoint Designer Workflow to change an InfoPath Content Type?

    Patrick

    Thanks for the help over this one,  I did wonder about the merge forms capability, however have never played with that side of things.  I'll also look at the SDK for the example.  This is one of those situations where even if it might all be doable, the outcome is something so horrid that it just doesn't work as smoothly or as well as I'd hope, and a completely different approach (split the form?) might need to be adopted.

    If you think of any other crafty methods I'd appreciate more ideas.  In the meantime it's break out the SDK.......

    Regards and Thanks.

    AlanC

  • 05-21-2013 11:53 AM In reply to

    Re: Use SharePoint Designer Workflow to change an InfoPath Content Type?

    Hi Patrick and Others

    Need your help regarding one technical challenge that i am facing with Infopath 2010 and re-usable workflow of SPD 2010. i.e., Re-usable workflow that was developed for content type of InfoPath form is not available in different server after deploying both workflow and Form. Don't know i am asking my query in right forum or not. I am very desperately need a solution and so i dont want miss any opportunity of discussing the issue.

    Here comes my scenario with full explanation:
    1. I developed a Form with Admin approval method in InfoPath 2010. So that i can deploy it in multiple server like staging and production based on the content type that i will get after deploying the form.

    2. Developed a re-suable workflow by SharePoint designer 2010. Here while creating re-usable workflow, i selected the content type that i got by above step 1. After that i published the workflow.

    3. Now attached the respective form template to Form library and attached re-usable workflow to the respective content type.

    Every thing worked perfectly till here. ie., till that server (let say dev server).

    Now i deployed both re-suable workflow and InfoPath form to different server (lets say staging server). Then i observed, i am not able to attach re-usable workflow for the respective content type of InfoPath in Forms Library. However, i am seeing my deployed re-usable workflow in Workflows gallery.
    This is what my issue is. I need your help in making my re-usable workflow and InfoPath work as it works in development server.

    Limitations: I don't have option of taking dev site as template and restore in other server.
    Please let me know if i need to provide any more information.
    Thank you
    Raj
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.