in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Michael Lotter's little view of the big world of SharePoint and InfoPath

December 2007 - Posts

  • Happy Holidays!

    Just wanted to wish everybody the best over the holidays.

    Cheers

  • Using InfoPath 2007 Translate function to do what XPath lower-case function does

    Several days ago Joe and I found ourselves wanting to make sure we made the InfoPath “UserName()” function return all lower case characters and we decided to use the common XPath function “lower-case” but was surprised because it didn’t work. With a little research I found that we could use the InfoPath “Translate” function instead. I must say that it’s a little frustrating that some common XPath functions don’t work and you have to find the work around but if you do any InfoPath development you come accustom to it. Below is what we tried that didn’t work and what we did that did work.

    What didn’t work: lower-case(xdUser:get-UserName())

    What did work: translate(xdUser:get-UserName(), “ABCDEFGHIJKLMNOPQRSTUVWYXZ”, “abcdefghijklmnopqrstuvwyxz”)

    Basically for “Translate” we had to specify every letter in the alphabet in UPPERCASE and then lowercase to make sure every character will get translated. For more information on “Translate” checkout this link http://office.microsoft.com/en-us/infopath/HA012330391033.aspx and do a search for “Translate” for the official description (It’s towards the bottom of the page).

    If you foresee yourself using this more often then something to consider is creating a “Template Part” for this. It would be very simple because it would have two fields one called “translate_uppercase” and another “translate_lowercase” and each field default value would be the alphabet in the correct case. Then whenever you would want to use the “Translate” function you would add the “Translate Lower Case Template Part” to the form and build the expression as translate(fieldname, translate_uppercase, translate_lowercase). This would be a lot simpler than typing in all those letters and if you have more than one person doing InfoPath development it would create a standard way of doing it.

    Cheers

  • Using the iisapp command to get the Process ID for the correct w3wp process for Visual Studio debugging when doing SharePoint, Workflow or InfoPath development

    I'm sure this is posted in a 100 different spots but I just learned about it before I went on vacation and wanted to share it.  It has never really bothered me at guessing which w3wp.exe process to use for debugging SharePoint code but when I was working with Joe (new guy) he saw what I was doing and he told me there was a lot easier way of identifying the w3wp process.  He said just open a command prompt and type in "iisapp" and it will list all the Application Pool processes with the process ids.  I took his advice and sure enough it gave me everything I needed to choose the correct process from the Visual Studio "Attach to Process" screen.  If you don't really know what I'm talking about then below is details on how to do it.

    For me there are times when I'm developing with InfoPath or SharePoint and I need to create some code (Workflows, Web parts, ...) that runs part of the w3wp process and running it in debug mode from Visual Studio is not possible and you will have to deploy the code and then attach the Visual Studio project to the w3wp process that its deployed for stepping through the code.  For example, recently I had to create a new SPD Workflow Action to send out emails with a "From Address" that can be specified and to use the SharePoint SMTP property that's set in Central Admin.  To do this I had to create a new Workflow Activity Library project and this project type can't be run in debug mode from Visual Studio (if I'm wrong about this please correct me).  To debug the code in this project you have deploy it first and then attach your Visual Studio project to the w3wp process that it runs in and then do something from SharePoint or InfoPath that will execute the deployed code.  To attach the Visual Studio project to w3wp process you can either click "Debug->Attach to Process" or "Tools->Attach to Process" menu combination and then the "Attach to Process" screen will appear.

    Then you will need to select the w3wp process that your code is running in.  If you develop on a SharePoint server then you will almost always have more than one w3wp process to choose from.  This is where the "iisapp" command helps out.  If you open a command prompt and type "iisapp" then it will list all w3wp process (Application Pools) running with some details.

    This list should give you enough information to choose the correct w3wp process from the "Attach to Process" screen.  Click the entry you want and then click to the "Attach" button to attach to it.  Now set your break point and then do something from SharePoint or InfoPath that will execute the code.

    I'm sure this was a big repost for most people and I'm sorry for that but I just wanted to share what I learned that way it may help someone starting out with SharePoint, Workflow or InfoPath development.

    Cheers

  • NJSPUG Meeting Details for December 19th

    The NJSPUG has launched a new website at http://nj.sharepointgroups.org/default.aspx and all the details and future details of user group meetings can found here.  As I previously mentioned that I'll be speaking at the December 19th meeting and all the details are below.  Hope to see you there.

    NJ SHAREPOINT USER GROUP: 

    Wednesday, December 19

     https://www.clicktoattend.com/invitation.aspx?code=121800

      Creating InfoPath 2007 forms with InfoPath Forms Service for the enterprise

     

    Guest Speaker: Michael Lotter MCP, MCTS

    SharePoint Solutions Architect |

    B&R Business Solutions, LLC

    "With the new version of SharePoint and InfoPath being officially released this year the concept of building and using e-forms in the enterprise has officially become a reality by using InfoPath 2007, InfoPath Forms Services and SharePoint 2007 Enterprise.  This presentation will describe how to use InfoPath 2007 and InfoPath Forms Services (part of SharePoint 2007 Enterprise) to accomplish this with your existing or new SharePoint 2007 Enterprise installation. A demo will be given to show how to build and publish an InfoPath 2007 form to InfoPath Forms Services and how to active the forms from InfoPath Forms Services to a Site Collection."

     AGENDA:

    5:30 PM EAT + GREET
    Networking, Free Food/Drink

    6:00 PM Guest Speaker

    "Creating InfoPath 2007 forms with InfoPath Forms Service for the enterprise"

    6:45 PM  WRAP UP
    discussion, prize giveaways

     

  • Back from vacation

    Heather and I just got back from a 2 week vacation in Dominican Republic and we had a great time. Heather wanted to stay longer but I was ready to get back and somehow convinced her to get on the plane for home. I'm not that much of a beach and ocean person but still had a great time do to the friendly people at the resort in Punta Cana and citizens of Santo Domingo. We only stayed 4 days in Santo Domingo and were unable to see everything but hopefully will have a chance to go back in the coming years to see everything else. Heather and I took some pictures while we were on vacation and when I get a chance I'll upload them to the net.

    Cheers


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts