Deploying InfoPath forms to different SharePoint servers - sharepoint

How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment?

This is a common problem, if you are working on a dev-system and need deployments to a productive system from time to time. I use a script that performs (plain text) replacements based on regular expressions.
on each deploy:
make a backup of your form ;-)
Save your form as source code. (I suggest you work on source code files rather than the .xsn, because the xsn is only a renamed .cab with the source files in it. And you are able to use source control in a more satisfying way.)
open the manifest.xsf file
search for the xml node "DataConnections"
search and replace the site-url part
(Do not forget the save-path, file-&site attributes and publishUrl)
deploy from the InfoPath Designer
I use a script that does all the replacements. That works fine and already saved me a lot of work.

If I understand your scenario correctly:
You have an InfoPath form, with data connections that submit your data.
You wish to deploy this form on multiple SharePoint Servers and have those data connections submit data to the currently deployed server.
You can't really get around needing to do work on every SharePoint server that you would want to deploy the form to. However, you can get around needing to modify the InfoPath Form Template.
If you use the SharePoint Data Connection Library (DCL), and create a UDC file from your data connection, on every SharePoint Server that you would want to use...then your InfoPath Template can just talk to the UDC file.
Here's a link to an article about integrating InfoPath with SharePoint's DCL:
http://msdn.microsoft.com/en-us/library/bb267335.aspx

If you go into the submit options, there is an option to perform custom action using rules. If you have all of the data connections set up, you can configure rules to select which connection to submit to.

re: speedfox's answer, try to stay away from editing the manifest whenever possible. It'll just lead to head aches.
If I understand your problem, you're deploying to multiple servers (DEV, UAT, Production) and need to edit the data connection manually every time you go from one environment to another? Forgive me if I've over simplified the problem
I've found the best way to make data connections site relative is to:
Use data connection files in your form. Open the data connection wizard in infopath and for all of you data conencting click "Convert..." this changes your data connection from being embedded in the form to being an independant XML file. You'll need a Data Conenction Library on you sharepoint site to store these in. Create that in the browser.
After you've converted and the connection go back into it and there will be a Connection Options... button use it to change from "Local data connection library" to "Centrally managed connection library"
Upload the data connection that is in your sites Data Connection Library to central admin
When you publish your form make sure you're publishing to a centrally managed location (Central Admin)
Use your form as a content type in any forms library on that site collection.
To use the form on another site, upload the data connection file to the new servers central admin and publish the (unchanged) form to the centrally managed forms.

See my blog post where I take you step-by-step with relevant snapshots covering the following:
a. Converting InfoPath Data Connections to DCL library in SharePoint.
b. Publishing InfoPath form to a SharePoint List/Library
c. Creating a .wsp solution package for the InfoPath form and its code-behind
d. Creating a batch script that will deploy the InfoPath form on your Production site.
e. Ensuring the InfoPath form has been deployed as a feature
f. Modify the DCL's in the production environment.
g. Associate the InfoPath Content Type with the Document/Forms Library
See the full blog post at: http://www.sharepointfix.com/2009/12/infopath-2007-form-and-nintex-workflows.html

By site-specific, do you mean that the data connections in your forms refer to the server the form is deployed to? If that's the case perhaps you could tweak your connections to use localhost instead of the server name for the hostname part of the data connection URLs.

In my scenario, I am not using the built-in "save" button. I have a data connection that I use to "post" the data to another list.
Yes, that's what I mean by site-specific. I don't think you can use localhost 'cos then when a user saves the form, it'll try to post to the user's computer (i.e. localhost). I have tried to use relative paths but that doesn't seem to work.

Related

Lotus Notes auto export

I am doing trend analysis of data from lotus notes. I need to manually export data from lotus notes and import it into excel. Is there a way to automate this? I can even work with Access. I tried to create an agent and I do not have access to do so.
There are many ways to do this, depending on your skills and your access to the Notes database.
First of all, when you say "I do not have access to [create an agent]", are you saying that you don't have designer access to the database where the data lives?
If that is the case, simply build a separate Notes application, and write your export agent there. Put that application on the same server, and you can set the export to run every night 8or whenever you like).
Another option is to use COM in Access and pull the data over that way. You have all the COM classes documnented in the Domino Designer help, and the code should be very similar to what you would writ in Lotusscript.
A third option, if the database is web enabled, is to use HTTP to pull the data out of views. You can read it using ?ReadViewEntries, either as XML or as JSON. This requires that all the data you need is exposed in the view, though.
I think the first option is the best, though. However, if you have been tasked with creating this export, you should be able to ask for proper access to the database...
I know this is a past posting, but someone may need the latest answers get to Domino Data.
You can export any view in Notes. File -> Export -> Select CSV as the option.
Then there is the IBM ODBC driver. There are two versions. One for 8.5.3 and another for 9.x. Download here http://www.ibm.com/developerworks/lotus/toolkits.html
Instructions on how to install here http://xpagesbeast.com/uxdesign/dont-forget-about-the-notessql-driver/
Using DomSQL which is a true JDBC driver for Notes Domino data. Non Notes environments can execute SQL SELECT queries using this JDBC driver.
http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-8Q7AW3
Using the Domino REST Services. You can access DominoData through a URL and it returns JSON. There are URLs to get all database instances on the server, then you can get all views in the server, and you can then access documents in the views.
http://www-10.lotus.com/ldd/ddwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Domino+Access+Services+9.0.1#action=openDocument&content=catcontent&ct=api
If you cannot create an agent (no designer access) you can try to install NotesSQL (ODBC driver) besides your Notes Client and access with Excel, MsQuery, etc. with your user id.
You can find more information here: http://www.ibm.com/developerworks/lotus/products/notesdomino/notessql/

Convert Domino Web Application to HTML

Is it possible to convert a .nsf Domino Web Application to HTML? I need the application making available offline without the use of a Domino server. To elaborate on this, we have an external company that host a domino application for us, a document management system. They are soon going to pull the plug on the server and have sent us a .nsf file. If we had a domino server it would be great, we could just place the file on the server. But the problem is that we don't. That is why I was hoping if there was a way to extract all the content so that it could run without a domino server, just as a bunch of HTML files, we don't need the functionality of the DMS, we just need to be able to view the content.
Thanks
If it is an application with logic and actions built on Domino's programming framework, and not just a set of static pages, then the answer is no. First of all, because HTML is just a markup language, not a programming language or framework. And secondly, because the various attempts that have been made to build tools to migrate Domino applications to other frameworks have generally not been very successful. GBS has tools to migrate traditional Domino applications to XPages, but that's probably not what you want.
If the site is static you could copy it using a web site copy tool like HTTrack: http://www.httrack.com/
The tool crawls the entire site and generates HTML pages.
Using the Notes client, create a local replica of the database. With that database open in Notes, click on Actions in the top-line menu, then Preview in Web Browser, and choose Internet Explorer. You may need to change the ACL to allow Anonymous to have Reader access. If the data needs to be secure, create a local copy instead so that you can modify the ACL without putting the production copy at risk.
You can download the Notes designer client from IBM with no restrictions as well as the Notes and administrator clients with a 90-day evaluation period.

SharePoint 2010 site template with a form library - the form template contains site URL

I am working on a site template that will be used to create hundreds of sites for different org units. The site should contain a form library, with an InfoPath form template.
My question is - is it possible to create a template and let power users create sites, without any administrator or developer involvement? If not - what's the easiest alternative?
The problem is that the form template contains the site URL and I don't know if this can be avoided. As a consequence, when a site is created and a form submitted - it ends up in the library of the original site.
I have created a handful of sites for the pilot project and what I've been doing so far is to uncab the XSN file, edit the URL manually, repackage into XSN and publish to the new library. This works, but involves a manual step in the site creation process that I wish to avoid. Here are the lines I'm editing:
<xsf:submit caption="Submit" disableMenuItem="no" onAfterSubmit="close" showStatusDialog="no">
<xsf:davAdapter name="SharePoint Library Submit" submitAllowed="yes" overwriteAllowed="no">
<xsf:folderURL value="http://my_farm_url/subsite1/form_lib"
Also here:
<xsf2:solutionPropertiesExtension branch="wss">
<xsf2:wss path="http://my_farm_url/subsite1/form_lib"
I'm changing subsite1 to subsite2.
I tried to set a relative URL, first to the submit element, then to both, to no avail. The form was being rendered (in browser), the submit worked (no errors) but then the submitted form was not in the library. Looking further into this, the forms ended up being submitted to a form library on the root site - http://my_farm_url/form_lib! It makes sense when you think about it, that's where a relative url of form_lib takes you to, from the site, from the root site perspective.
For the moment the only solution I envision is to create a tool that will help users create sites based on the template, fixing the XSN behind the curtains. I don't know how to publish a form template programmatically but it should be possible. Apart from this unknown, it's also not very automated and I'll be very happy if a proper solution is possible that will work with SharePoint/InfoPath tools only.
You need to schedule a EventReceiver there is no way to do it for configuration.
In EventReceiver you have to read the file "Manifest.xsf", update the XML node is defined where the url and save the file "Manifest.xsf".
To read the XML node is necessary to use System.Xml.dll

Lotus Notes Views are not showing up in the web browser

We have a legacy Lotus Notes application that we want to see if we can make an improvement, first by making a test environment for this application. Currently the application is located on the main server and being replicated every 15 minutes to the web server. The replica on the web server has different forms and views since they are adjusted to display the information on the web browser (in my understanding)
I have made a new copy of the application that is on the main server without any problem. I had some problem replicating it to the web server since I do not understand what will happen to those element design that are not being used in the application on the web server. So what I did was replicating the application from the main server to the web server, then deleted all the design elements on the web test then copy all the design elements from the production environment to the web test.
By doing that I was able to get into the login page then log in. After I login, the frameset that suppose to display the default view giving this error message 'HTTP Web Server: Couldn't find design note'. First of all, I thought this is normal since I could not find the view in the database and that confused me since the live system works without that view present on the database BUT when I tried to access a view that I know present on the database, I still get the same error.
So after all that I opened the web test application on a Lotus Notes client. I can open the views that are exist. Now at this point there are 2 things that I am very frustrated about:
The live system works even when the code specifically mentions views that I cannot find from the Domino Designer. It just does not make any sense
As a test I created a 'Test' view on the web test application. Basically I just told it to fetch one of the form called 'WORec' that contains Work Order information. Into my surprise, the view opens up on the web browser but shows no result, which frustrates me even more since the view 'WOByName' gets all the Work Orders just fine. These 2 views have the same selection formula, so I really do not understand why 1 view is able to show data where the other does not. Moreover if I tell the test view to fetch all the documents in the database it only fetch those documents that are not 'WORec' form
I know this is long but if I can get some pointers on what I am doing wrong here. I am just trying to create a test environment. Unfortunately I never dealt with Domino web application or a replication that completely has different element design.
Let's start with the test view.
When you created the view, you need to first verify it is a Public view. Private views or Shared Private on First Use (SPOFU) views are not what you want here.
also, verify the name and alias of the view is unique to your database.
Next, verify your selection formula is correct.
use formula, instead of simple so you can actually see the formula. e.g.
SELECT #UpperCase(Form) = "WOREC"
Refresh your view designer (F9) - do you see your records coming through?
also, make sure the view is not hidden from Web clients... you will see this in the designer client, when looking at a list of views - a column indicating whether or not it is hidden from web clients, note clients, mobile clients, etc.
if not, open one of the documents up. Show properties, verify the form property in the box (2nd tab), matches the value "WORec". If not, correct your view selection with the correct form name spelling.
Next, you need to make sure you are allowed to view this from the web.
Open the Access Control List (ACL) and add "anonymous" as reader or above.
Open the view in Designer, and Preview it in web browser.
As for the "Couldn't find design note" message - that's not good. You definitely are missing design elements. Whether this is due to a selective replication formula issue, or acl issue, or whatever, is hard to tell. But if you have a Notes thick client and a separate web version, I would recommend different databases (or master templates) and not trying to use selective replication to handle that sort of thing.
As I understand it, you replicated the database then deleted all design elements and manually replaced them by copying from the production web replica. Instead, you should have made a template from the production web database (by doing a design-only copy), and then you should have used the 'Replace Design' feature to update the test web database from that template.
As an aside: an application built the way you describe (two replicas on separate servers, each with a different set of design elements) is a pretty bad implementation. It may have been done in the very early days of Domino, before the "Hide from Notes client" and "Hide from Web" properties were available at the design element level. Or it may have been done deliberately for "security purposes" (which I put in quotes because relying on Domino design element to enforce security on a Domino web application doesn't really make the application any more secure). You may be stuck with this... but you may not be. So before you try to improve or enhance this application, I think you should look into using the "Hide from... " properties on the design elements.
On the other hand, if you stick with the current design, I do want to mention that you're going to need to make sure the ACL settings and selective replication settings on your main and web test replicas match the ACL selective replications settings on the corresponding production replicas. Otherwise, you'll end up with a jumble of design elements when the test databases replicate across servers.
I suggest you to make a new copy of the Notes Database that is on your web server to your test server.
try to open in with your browser and check that all is OK.
open this copy in designer and check that it contains the views that you didn't see previously on test.
I'm not sure that you have really 2 different designs (one for webser different from the one of your main server) so:
- on the main server: open the File/Replication/Option for this application. In advanced, check When web server receives from .... if the design elements is checked.
if not it makes sense that there are TWO different design versions.
Maybe the view you didn't find (on the web server) restricts use? to check this:
- In the view (on the main server) check in the properties of the view the tab with a key "all readers and above". If it's uncheck THIS is the reason why they don't exist on the web server AND that you don't see them in the designer:
If your don't have the role or are not the person which can "who may use this view" you don't see the view and can't copy it.
To correct this simply enter the ACL (file/Application/Access Control) and grant you the corresponding role.
I hope I helped

comparing sharepoint list and sqlserver table

I have a list in sharepoint which maintains particular month OnCall list,and we are maintaining employee directory in sql server. My requirement is to get complete data from sql server and show it in sharepoint and compare with sharepoint list and show small icon for the employees who are On Call for that particular Month. Can anyone please suggest me the waus of implementing this.
Thanks in advance.
Update: I have finished the part where I have to connect to the sqlserver database and get the employees information. For this we are using 3rd party web part to connect to the sql server and pull the data from the table. Now I have to show some kind of image on the employee name to show that he is on-call for that week. We are going to cretae custom list for maintaing the list of people who are on-Call. Can anyone please advise me on how to accomplish this.
Write a custom webpart which will pull the data from the list using sharepoint object model and SQL server using ADO.NET and do the said comparison.
If you were looking for out of the box, I am afraid there i too little information given here to analyze if its feasible out of the box or not.
If you have the SharePoint Enterprise version, you can look at using the Business Data Catalog. This will let you bind columns to external data sources. This might provide you with the functionality you're looking for.
If you do not have the Enterprise features, do you have access to deploy WSP packages and custom code?
You will have to write your own data access to your external data source. Your options would be to have a job that pulls data from the external data source and populates SharePoint list(s) or create a custom view that pulls the external data on-demand.
You'll have to come up with synchronization strategies. Meaning, is the data in the external SQL data source static, reference information that does not need to be updated depending on what a user does in SharePoint? This seems to be the case based on your question. If you do need to update the external data source, you'll have to hook into the on save event (so probably a custom event handler that listens for ItemAdding) to update the data, validate, and optionally cancel the operation with an error message.
If you can't deploy WSP packages / DLLs, you could take a look at the jQuery SharePoint library. This will let you interact with lists using jQuery. If you also write a WCF or Web Service wrapper around the data you need access to from your external data source that is accessible from the SharePoint environment, you can use hack together a solution.
To accomplish this you'd need to place a Content Editor Web Part on the page you need custom data access. In there you will write the code to reference the jQuery javascript library and jQuery SharePoint library. The code will have to make the calls to your external data service and make any updates you need.
This is the least reliable method to accomplish what you want since it's entirely page-based and can be broken by simply disabling script or someone editing the CEWP or removing it altogether.
If you don't have access to place a CEWP or any of the other solutions, then you have no options at all.
it relatively easy now to pull all the data using the third party webpart and saving it into a custom list. I would recommend you not only creating custom list but also creating the content types for this list. take a look at SharPoint MVP's post about creating a Custom List with Content Types

Resources