Creating an item in a SharePoint Form Library from a SharePoint Designer Workflow - sharepoint

I'm using MOSS (SharePoint 2007) and InfoPath 2007.
I have a Form Library with an attached InfoPath form, and would like to create new items (forms) in this library during a workflow built in SharePoint designer.
I've tried using the "Create List Item" action, but it doesn't assign the correct metadata (the new item looks fine in a view of the list, but can't be used to render the form (the generic "form has been closed" error comes up if you try to view the item)).
I'm not adverse to writing my own custom WFA to do this in .NET if need be, although it'd be nice to find a simpler solution.
Can anyone provide any resources for how to achieve this in SPD, or programmatically? My searches on the topic so far have been unfruitful...

Found the solution to this, thanks to a video on YouTube: http://www.youtube.com/v/bcnC_XwCcAg&hl=en&fs=1&rel=0
For anyone else out there who (like me) might not be able to watch YouTube content where they need this information, here's the process:
Create IP form
Publish to SP Server (as doc lib)
On document library, change settings:
allow management of content types
display in browser
"Fill out" a blank version of the form and save it to the doc lib with name "template"
Open context menu for "template" form and select Download a Copy
Delete "template" form from document library
Open library in windows explorer
Open Forms dir
Paste downloaded copy of "template" form into the Forms dir (as template.xml)
Go back into doc lib settings
turn off management of content types
change template url to template.xml
press OK to save changes
Go back into advanced settings ago, and turn management of content types back on
In SPD, make a WF which uses Create List Item to put an item in that library
And that's it. Just 12 steps needed to publish an InfoPath form so that it behaves as you'd expect, and any SharePoint developer should be familiar with 12-step programs.

Related

Create a button on Infopath for users to export form to PDF

Currently I have created a travel request form using Sharepoint 2013 and Infopath 2013 that once you submit the form, it creates a line item on the list as well as workflows to their managers for approval.
Once the managers have approved the form, on the form itself there is a field called "Approver" and "Approved On" that shows when and who have approved the form.
I want the users to be able to open the form and have a button to export the approved form to PDF. Is this possible?
Thanks for all the help!
You may want to move this to http://sharepoint.stackexchange.com, a sister site of StackOverflow.
What I always recommend (as I work in the InfoPath / PDF business) is to attach a simple workflow to the associated forms library using a workflow tool of your choice (SharePoint Designer, Nintex Workflow, VS Workflows).
Make sure you export the relevant InfoPath status field to SharePoint so you can read the column's content in your workflow. In your workflow check if the status field is 'Approved' and if it is run a PDF Conversion action.
Now, for the big trick, the 'PDF Conversion' Action. No such action comes with SharePoint out of the box, but it is available from third parties. Google for the appropriate search terms, e.g. "Batch convert infopath using workflow" and you will find several solutions. (Disclaimer, I cannot link directly as one of the solutions you will find is one that I worked on)
Probably it will be interesting for you to use already existing business solution - PDF Share Forms. It is PDF form integration to SharePoint with bi-directional data synchronization (form field contents synchronizes with SharePoint columns automatically both directions). Support for archival, versioning, form flattening, workflows. Filled in form could be sent to a person, who filled it in, etc. www.pdfshareforms.com for more info
(I work for PDF Share Forms)

Force InfoPath form to open in Browser

I created an InfoPath form that uses VB code to push fields into a custom list I created on a SharePoint 2007 site. This part works.
I "published" the form into a form library.
I changed the settings on that form library to open items in the browser and allow editing of content types.
In InfoPath under Form Settings I chose the compatibility setting to allow this form to be opened in a browser, I linked to my Forms service online, and ran the design checker. No errors.
When I try to open it in the browser using the "Edit in Browser" setting I get this error message:
This form template is not currently
browser-enabled. It must either be
republished as a browser-enabled form,
or opened using Microsoft Office
InfoPath 2007.
No matter what I do, the form will not open in the browser. This is all I want. Did I miss something??
You need to upload your form thru Central Administration because you use code in your form. See this MSDN acticle.

Drag and Drop files into a SharePoint webpart to upload into DocLibrary

Is it possible to create a SharePoint (wss3 or MOSS 2007) webpart, to allow files to be dragged and dropped onto it, which would then upload the files into a predefined document library ?
I imagine that this would require some form of client side scripting (Ajax ?), but my knowledge in ajax is a bit sketchy.
From my exploration so far, I'm thinking:
User drags file onto 'drop zone' Webpart.
This action triggers some code
This code Loads the file into a SharePoint library (like this : Uploading a File to SharePoint)
Any pointers would be gratefully recieved
Many thanks.
Nick
Well,
What I'd do is, like you said, a web part with javascript that allow the user to drag and drop some files into a zone inside the webpart. Once the user has finished I'll upload those files after click on a Button of the webpart. I think is better to work with SharePoint in an unique transaction and not upload and delete files using AJAX. So, the drag and drop functionality can be done using some kind of javascript like Scriptaculous and the other one like a classic postback.
You might also want to look at another way to perform this. If you do it in a webpart, you will need to add that webpart in every sites where you want this fonctionnality to work. You might want to try Sharegate (www.share-gate.com). It's a end user tool that allows you to drag and drop file from your computer (or any SharePoint list / library) to any SharePoint library. By dropping the document inside the library, you will be ask to select a property template where you can define all the properties attach to your document. Not only you will drag and drop documents, but you will structure the information at the same time. Hope this was helpful!
Perhaps my reply is little bit irrelevant to your post!
I think upload files to SharePoint is not a painstaking job, the build-in feature is enough for us to upload files.
The trouble, I think, lies in the check in process, may be that is what you should do!
Altought maybe not that important now, but there is a SharePoint addon on CodePlex now
that allows files to be uploaded by Drag & Drop into SharePoint document libraries.
Available here: http://dndupload.codeplex.com/
Works in Firefox & Chrome, uses FileApi from HTML5, supports both SharePoint 2007 & 2010.

Infopath Form Template Conflict

We have a bunch of story libraries in Sharepoint 2003 for all of our different projects. We created a nice Stories Library with a bunch of useful views in Sharepoint. Then I exported it from Sharepoint designer and I use that template to create a library for each new project.
The problem is, the Infopath template always has the same ID. So when you open a story from a different project, you get a "Form Template Conflict" in InfoPath. The only way I found around this is to upload the form template to a Library of a unique name (this changes the Form template ID). But the problem with this is when I create a new, unique library I lose all the cool useful views which were included when I exported the Library. I tried changing the ID:
Form Template Conflict - Same Form ID When Copying Template
But this didn't work, when I published it, it reverted back to the generated one.
Thanks
Upgrade to SharePoint 2007

Easy way to create a form to email in SharePoint without using infopath

Does anyone know a good way to do this? I need to have simple forms that submit to email without writing a lot of code. These forms will be hosted in content-viewer web parts or similar in MOSS 2007. I'd like to avoid using InfoPath.
You could use a list which would give you the input form.
It depends on a) whether people should be able to see each other's submissions and b) who the e-mail should go to.
You could set an alert (Actions -> Alert Me) to send an e-mail to a person/people when a new item is added to the list.
In Settings -> List Settings -> Advanced Settings, there's the options for which items a user can see/edit. Alerts however cannot be set on lists where users can only see their own items. In this case, I would use a simple workflow to send the e-mail. I've only worked with MOSS 2007 and SharePoint Designer though - I'm not sure about WSS.
You could implement a list as suggested above, and add an SPItemEventReceiver for sending emails when list items are added or changed (the link shows all of the events available to be handled)
With the sharepoint sdk, you can create your own webparts. If you add them to the GAC you can include them on your sharepoint site. You'd of course have to build a webpart for emailing though.
A workflow in Sharepoint Designer should be easiest way to implement it with no need to code.
Here's an article that explains how to do this:
Workflow example: Send a notification message :
http://office.microsoft.com/en-us/sharepointdesigner/HA101829081033.aspx
Create a simple HTML form in a text editor with the required text boxes, text areas, select drop downs etc, add a mailto tag and save.
Then add a page viewer web part under Media and content.
Select site actions, Edit page and under the editing tool tab select Format text, HTML Markup edit HTML source and paste your HTML form you created he text editor into the source window and select OK and save.

Resources