SharePoint Users Group > SharePoint Blogs > Bob Filipiak
Welcome!  I've been flipping bits since 1971 and working with SharePoint since 2002 among a myriad of other things. Hopefully I've learned a few things that I can pass along.
SPPS 2003 - InfoPath Form EventHandler Problem Solved 
We have an Issue List for Service Requests. We have an EventHandler on a
Form library that processes an InfoPath form when it is submitted and
generates a new Issue List item. Once an item is initatiated, a supervisor
assigns the Issue item. The Assign To column is a LookupColumn that draws
from User Information (Contacts List). There is also another LookupColumn
that pulls a 'Service Type' column from another list.
the process has been working well for a year or so. Now there is  a
requirement to add the 'Assign To' and 'Service Type' to the form. I have
created a new form with the required LookupColumns and published to a new
form library. I have created a new EventHandler for the new library that
creates a new Issue Item is the same Issue List.
The problem is I can't get the EventHandler to and an item that contains the
values for the LookupColumns. the EventHandler fires and send an email
writes to the event log, but does not add a new item to the Issue s List.
The EventHandler uses:
 
                If InStr(Trim(oField.Title.ToString), "AssignedTo") Then
                    sAssignTo = oItem(oField.Title.ToString)
                End If
                If InStr(Trim(oField.Title.ToString), "ServiceType") Then
                    sServiceType = oItem(oField.Title.ToString)
                End If
 
Then when it tries to add the new list item it uses:
 
                newItem("Assigned To") = sAssignTo 
                newItem("Service Type") = sServiceType 
 
 The item does not get created.
 
I Googled and tried searching the wsssdk.chm, but haven't had any luck.
 
I know that LookupColumns use the format {0};#{1} where {0} is the ID of the lookup item and {1} is the Text of the Lookup Item. So I tried doing a SELECT CASE on the AssignTo and making the sAssignTo contain the ID and the Text; e.g.
 
                    Case "Robert Filipiak"
                        sAssignTo = "2;#Robert Filipiak"

That didn't work either. I tried:
 
newItem("Assigned To") = SharePointWeb.Users(sAssignTo)
 
That didn't work either but the new list item got created without the anything in the 'Assigned To' column.
 
That got me thinking and I went back to using
 
newItem("Assigned To") = sAssignTo
 
but change the SELECT CASE to:
 
                    Case "Robert Filipiak"
                        sAssignTo = "2"
 
Voila! Success!
 
 
Passing the ID of the Lookup item was all that was needed. So I did the same kind of SELECT CASE for the 'sServiceType' Lookup and everything is working as expected.
Calculated Field 
Every so often the question comes up on how code calculated columns. Every time I have passed "SharePoint Formulas" to Google.  This time I bookmarked the link and thought I post it here as well:
 
Successful Migration from SPPS 2003 to MOSS 2007 

Based on the white paper, http://office.microsoft.com/download/afile.aspx?AssetID=AM102421321033 , we performed the following:

 

1.      Setup two servers that mirror the production portal.

2.      Configured new MOSS 2007 Portal Farm.

3.      Backup the production portal and restore it to the migration portal.

4.      Upgrade the SQL server to SQL 2005 and run stsadm.exe  -o upgrade /forceupgrade

5.      Ran prescan.exe and corrected problems until prescane.exe ran error free.

6.      Stopped the migration portal.

7.      Detached the …_SITE and …_PROF databases from the migration SQL server.

8.      Copied the …_SITE and …_PROF databases to the MOSS Farm SQL Server and attached the databases.

9.      Ran stsadm -o addcontentdb -url <URL> –databasename <database name>

 

10.  Based on http://technet.microsoft.com/en-us/library/cc263299.aspx, ran:

[-databaseserver <server name>]stsadm -o restoressp -title SSPName-url http://portal:PortNumber –
ssplogin DOMAIN\ServiceAccount -mysiteurl http://portal:PortNumber/mysite 
-indexserver MIGRATIONSERVERNAME -indexlocation "C:\Program 
Files\Microsoft Office Servers\12.0\Data\Office Server\Applications" –
keepindex  -sspdatabaseserver SQLSERVERNAME -sspdatabasename SPS2003_PROF 
-ssppassword ServiceAccountPassword

11.   Reset all sites to the default definition.

 

Hope this helps.

 

Welcome to your new SUG blog! 

Welcome to your newly created SUG blog! Use the "Admin Links" on the right-hand side of your screen to create posts, manage comments, launch a blogging program, or to view all site content. You can also use the "Site Actions" menu that appears at the top-right portion of the window. Here are a few tidbits of information to keep in mind when setting up your new blog:

  • The first time you make a post, the "about me" web part at the top-right portion of the screen will be customized for your user profile.
  • You can add, edit, or remove post categories by clicking on "All Content," to the right.
  • Your "Tag Cloud" will be populated as you make posts and select categories.

If you have any questions, please feel free to ask questions or read posts in the SUG Community.

 Useful Info

  Work Around for Group Email Limits

 Bob Filipiak

 Tag Cloud

 ‭(Hidden)‬ Admin Links

Other Blogs
There are no items in this list.
powered by Microsoft Office SharePoint Server 2007