Showing posts with label InfoPath. Show all posts
Showing posts with label InfoPath. Show all posts

Tuesday 11 March 2014

Capturing data for SharePoint

I got an email from an old school friend that heard I may do some SharePoint stuff. 

"I need your advice on a Sharepoint question.  We have a client that need users to capture forms and the ablity to create new forms on the fly, does this sound possible?"

My dashed off reply is below  - comments are welcome

On the SharePoint thing, this is the deal with forms. InfoPath was the standard for creating web forms for SharePoint, saying that about 3 weeks ago, MS announce it is no longer the product of choice and it will not be support after 10 years. It really comes down to how hectic the requirement is where you want you data stored.

SharePoint out of the box allows for users to create lists, this are not too complex and the logic is generally pretty simple. It works really well if your requirement is simple web forms, lots of them and not relational data. All native, very little training but customizing the default look and functionality gets expensive real quick (inject custom JS), there is also a tool SharePoint designer that can be used to customers the forms. When you create a list the CRUD forms are all created for the list.

InfoPath - tool to draw forms custom logic, lots of issues when it get complicated but if you need a lot of forms fast and need some logic this is still a good option.

K2 and Ninetex have forms engines, I have used smartforms from K2, For forms for workflows and building complex forms this is a good option but more if you have a dedicated forms team/guy. If you told me you need 1000 forms with complex logic and more forms need to be added in time, there is workflow and you will have dedicate form requirements this is a good option but be careful it is not as easy as folks may make out.

Pdf share forms work with SP, so if your client has pdf forms - make sure you look at this.  I've never used this approach but it seems plausible.

Custom options, such as SharePoint Designer aspx, you can build and deploy aspx pages, slow but good for customization. Good option if you have a unique complex requirements (think a drawing tool) as basically you have full C# control. You can also create web apps and consume them in SharePoint.

With what I think your skill sets is at .., it is probably also worth looking at using MVC or creating the forms in .NET code (webforms), then display using iFrame or the new app model in SP2013. You secure the app using claims based auth/OpenId/OAuth.
Those are your basic options. Send me some more detail and I can try give you a clearer match.

Also see:
http://go.limeleap.com/community/bid/286331/Forms-in-SharePoint-Seven-Ways-to-Create-a-Form-in-SharePoint
http://blogs.office.com/2013/03/04/options-to-create-forms-in-sharepoint-2013/#comments

With SharePoint 2013, look at CSR.

Ultimate Forms from InfoWise offers a good option for form capture and output.
Stratus Forms looks like a great tool.

Update 09 March 2016:
·         SharePoint 2016 on-prem. shall support InfoPath Forms Services until 2026 (extended support only from 2021).
·         InfoPath Forms on Office 365  supported until further notice.
·         No InfoPath 2016 as part of Office 2016, use the InfoPath 2013 desktop application to build forms.

Monday 11 July 2011

Building a WCF Web Service for InfoPath data

Problem: Create a WFC web Service to store an InfoPathForm

Initial Hypothesis:  Project consists of 3 parts: 1)SQL Server table for storing form data, 2)WCF web service for exposting the storage web service method and 3) consuming the Web Service using infoPath.

1) SQL Script to create the datbase table.  Once the table is available for storage we need to build the WCF web Service.
2) WCF web service:
2.1) Add the LINQ to SQL proxy (dbml file) to persist the data
2.2) Assign
2.3) Wire up the WCF WS
Edit as needed (apply business logic)
2.4) Expose the WCF thru an IIS website on your Dev machine (Create an IIS web site to host the WCF):
2.5) Publish the WCF using VS2010 as shown below to the local machine
Ensure the WCF service is available using the browser.

3) Consuming the WCF WS in InfoPath forms



How to Add a Service Reference?


1.> Ensure the WCF exists i.e. http://wcf-service/FormService.svc

2.> Generate the WCF proxy (VS > Right click the WFE project > Add Service Reference > Insert the url and save the WS reference)

3.> Copy the contents of the app.config bindings & endpoints elements into the web.config (this needs to be automated in the deployment script thru a configurable feature) Web.config is shown below:

4.> Call the WCF web Service (consumer)
WCFBanner.BannerClient ws = new WCFBanner.BannerClient();
WCFBanner.PatientBanner pb = ws.GetPatientBannerByPatientId("G3");
lit1.Text = "PatientId: " + pb.PatientId;
ws.Close();

Additional Info:
Comparing SharePoint InfoPath lists vs forms