For the same project I needed to delete an item from a SharePoint list, I also needed to filter data received from a SharePoint List. This is an easy thing to accomplish in a simple InfoPath form, however, if you need to make your form Forms Services compatible, the filter option in SharePoint isn’t supported. To get around this issue, I used a nifty trick using C# code and SharePoint’s ability to display a list in XML that Ishai Sagi posted on his blog at: http://www.sharepoint-tips.com/2007/01/infopath-form-services-implementing.html.
The code posted by Ishai Sagi was the following (all cod in italics must be replaced to match your form):
-
-
public void [Field]_Changed(object sender, XmlEventArgs e){
-
SetFilter();
-
}
-
-
private void SetFilter(){
-
FileQueryConnection q = (FileQueryConnection).DataConnections[InfoPath Data Connection];
-
q.FileLocation = q.FileLocation + "FilterField1=LinkTitle&FilterValue1=" + GetFilterValue();
-
q.Execute();
-
}
-
-
private string GetFilterValue(){
-
XPathNavigator nav = this.CreateNavigator();
-
string filterValue
= (string)nav.
SelectSingleNode("[Filter Field xPath]",
this.
NamespaceManager).
ValueAs(typeof(string));
-
return filterValue;
-
}
It is easy to implement, even for non-developers (like myself), and I haven’t discovered any downsides or problems with it yet.
Ben SharePoint
As I’m sure most people are all too well aware, SharePoint doesn’t backup sites when they are deleted. Due to this fact, a problem that often arises is that you will accidentally delete a site with no way to get it back except to restore your entire SharePoint content database from backup. This is all dandy, except it also overwrites any changes that have been made on any of your other sites.
To fix this problem, an add-on to SharePoint has been released called Microsoft IT Site Delete Capture Feature 1.0. It can be downloaded here for free. This is great if you only want to prevent accidental site deletion, but what if a particular site gets corrupted somehow? You won’t have a backup of it because it wasn’t deleted and you can’t restore just a site from a SQL backup job.
This leads to the second option. AvePoint DocAve is a very powerful SharePoint backup tool. However, this product comes with a price tag of several thousand dollars. It also has many great features not available anywhere else. It will not only allow you to backup and restore at the site level, but will allow you to do a backup and restore down to the item level. It also allows you to easily set several different backup schedules to backup various parts of your SharePoint installation at different times. This is the Cadillac of SharePoint backups and if you can afford the price-tag, a product I would highly recommend.
The third option is a solution which I wrote using PowerShell. It also makes use of PowerShell Community Extensions. Both of these must be installed on the server to run the backup. The backup script can be downloaded from here. The script will recursive crawl through a specified URL and backup all the individual sites, bundle them up into a date stamped zip file and move it to a location specified in the script. You can set this script to run as a schedule job in windows to regularly backup all your SharePoint sites. The disadvantage to this approach is that you get some replication causing large file sizes as the top level sites also include the content from all the sites under them. The instructions for setting up the script are in comments at the beginning of the script. If you request further details let me know and I’ll post additional information.
Ben SharePoint
While working on an InfoPath form for Forms Servers today I encountered this error when running the form in Forms Services: Unexpected end of file while parsing Name has occurred. Line 1, position 569. It really confused me considering I was developing my form in Forms Services compatibility mode and the forms worked perfectly in the preview mode of InfoPath. After doing some Googling, I discovered this blog: http://blogs.msdn.com/infopath/archive/2006/11/22/workflow-user-experience-in-infopath.aspx
Apparently this is a known issue in Forms Services. If you have a secondary data source in your form that is not be referenced anywhere within the form, this error will occur. To fix it you must either figure out which data source you aren’t referencing anymore or create some field that references that data source (you can hide the field if you don’t need it).
As soon as I deleted the unused data source in my form, it started working perfectly again.
Ben SharePoint