Using a combo of a View and Data Connection we will be able to grab ALL of the fields from a List or Library.
1. Open a Text file so you can paste stuff into it.
2. Open the site you want to gather the data from.
3. Navigate to Site Action > Site Settings
4. Under General Settings click on Audience targeting settings. With this page open look at the URL. Starting with the word List, copy everything to the right.
Example: List={515dc5f2-88b9-4f91-80a3-4e133f25d069}
5. Using your Text file, first paste your new List GUID onto the file, next page this string on a another line _vti_bin/owssvr.dll?Cmd=Display&List={GUID}&XMLDATA=TRUE&noredirect=true
6. Now, going back to your List GUID copy everything between the {} brackets. Then paste it into the {GUID} string got from my site, replacing GUID.
Example: _vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true
7. Go back to your site and paste the long string you just create into the sites URL (see example below for more detail).
Example: http://SiteName/SubSiteName/_vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true
8. You should now see a page full of XML pertaining to your List or Library.
To take this to the next level you can create a View to narrow down the columns returned in the XML.
1. Create a new View with the fields you want.
2. Edit your newly created view. With the Edit View page open scroll down to Mobile section. Looking at the URL under “Web address for this mobile view:”, grab all the letters and numbers after View=
3. Open this site (http://meyerweb.com/eric/tools/dencoder/) and paste that string into the URL Decoder/Encoder box and click the Decode button.
4. You should now have a cleaner GUID.
5. Paste that new GUID into your Text file.
6. We will now want to join the new GUID with our existing URL string (see below for example).
Example: http://SiteName/SubSiteName/_vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true&View={8478D19F-831D-45CB-8F24-A481444C5418}
7. You should now see different results than the first URL string we created.
Now the good stuff! Using the URL you can create XML Data Connections in InfoPath and be able to view columns that were once unavailable.
Tags: InfoPath
If you are looking for a way to capture the login user name in InfoPath try this.
Dim sUserName As String = System.Enviroment.UserName
If you want to capture user name from SharePoint try this:
http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx
Tags: InfoPath
After spending way too many hours messing with this, I got it to work. I was trying to update the Assigned To in a Form Library (also works in a Document Library) using a Workflow in Visual Studio 2008. SharePoint being SharePoint, nothing is ever easy.
In the VS I created a Sequential Workflow. Then I added a Code activity (codeActivity1) to the design. After that, double click codeActivity1 in the design window.
Create the Public variable wfP:
Public wfP As SPWorkflowActivationProperties = New Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties
Then add the following code to your codeActivity1 module.
Dim site As SPWeb = New SPSite(wfP.WebUrl).OpenWeb()
Dim list As SPList = site.Lists(wfP.List.Title)
Dim listItem As SPListItem = wfP.Item
listItem(“Assigned To”) = site.Groups(“gLeads”)
listItem.Update()
It should look like this when you are done:
Private Sub codeMoveToLead_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim site As SPWeb = New SPSite(wfP.WebUrl).OpenWeb()
Dim list As SPList = site.Lists(wfP.List.Title)
Dim listItem As SPListItem = wfP.Item
listItem(“Assigned To”) = site.Groups(“gLeads”)
listItem.Update()
End Sub
Trying to set the .AssignedTo never worked for me.
Tags: SharePoint
Dim siteName As String = workflowProperties.WebUrl
easy…
In Visual Studio 2008 I was trying to get the current sites URL. Doing this will allow for the workflow to be dynamically used in other sites.
Tags: SharePoint
I’m a little rusty on writing code and this is something that I spent way too much time messing with.
Dim destURL As String = “http://sitename/OtherLibrary/”
workflowProperties.Item.CopyTo(destURL & workflowProperties.Item.Name)
It’s not as simple as saying copy from/to. The CopyTo wants a URL, file name, and file extension.
If you receive this error:
Cannot create an item at the requested destination. Verify that the folder exists and that you have permission to edit in it.
Start by checking your syntax.
Tags: SharePoint
Recently tried a STSADM export / import to move a site to a new collection. After the STSADM import I tried to open a workflow using SharePoint Designer and received the following error.
The server could not complete your request. Contact your internet service provider or Web server administrator to make sure that the server has the Frontpage Server Extensions or SharePoint Services installed.
The fix was to recycle or restart the SharePoint server.
Tags: SharePoint
November 23rd, 2009 · 8 Comments
When creating my SharePoint 2010 sandbox farm I wasn’t able to get past connecting to the database server. This is the error I was seeing:
An error has occurred while validating the configuration settings. An exception of type System.ArgumentNullException was thrown. Additional exception information: The errorData argument cannot be null or zero length. Parameter name: errorData
I logged into my SQL Server 2008 R2 VM and updated the Start Mode of SQL Agent and SQL Serve Browser to Automatic.
What / Where / How
Start –> All Programs –>SQL Server XXX –>Configuration Tools –> SQL Server Configuration Manager
After it opens select SQL Server Services, right click on SQL Server Browser, select properties, click on Service, then set Start Mode to Automatic. Repeat these steps on SQL Server Agent service.
After doing this I restarted the server.
——– edit
if you are having trouble finding your SQL Server, Server Name try looking here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER
SNI10.0 — LastConnect
There you will find the name of your SQL Server
Tags: SharePoint
Total noob error on my part.
rebooted my test box and started to see this error:
NTLRD is missing
Turned out that my system was trying to boot from an external hard drive I had connected to the box. Unplugged the drive and rebooted and the system is back to normal.
Windows Server 2008 R2
Tags: Uncategorized
http://sharepoint2010.microsoft.com/try-it/Pages/Trial.aspx
not exactly sure what day they will release the bata version.
Tags: SharePoint
The jump from 2003 to 2007 wasn’t that bad. But I have a feeling that people are going to have fun with the new interface in SharePoint 2010, not to mention the changes to SharePoint 4.0 Central Administration. This should be fun!
Tags: SharePoint