Why the text on my InfoPath form is so large

November 18th, 2007 by mlotter

Thursday was another good day because there were several things that reminded me of things that I already knew but hadn't blogged about.  Anybody that works with InfoPath knows or should know that InfoPath is tightly integrated with IE and the below details is one example of this.

In the last post I mentioned that I was working with a new guy that will be taking over my work and whenever he opened a form in "Design Mode" his form text looked so much larger than mine and at times his text would wrap and mine wouldn't.  This morning it bothered me enough that we looked at what the problem was and we discovered that it was "Text Size" IE setting.  Below images of the same form but if you look really close you will notice that the labels are different sizes.  This is caused by the "Text Size" menu option being set at different levels.

When we changed the "Text Size" menu option to be the same as mine then the forms looked identically the same.  To change the text size in IE 7 click Page menu button next to Tools and then navigate down to Text Size and below is a screen shot of the Text Size menu option.  The second image is another example of getting to the same menu option and is pretty close on how to do it with IE 6. 

This situation will most likely stay with me for a while because it will be something that I will want to tell future clients to watch out for because it could truly be an issue help desks would need to watch out for.

Cheers

InfoPath Form Template Part data source appending to existing Main data source instead of replacing

November 13th, 2007 by mlotter

This week I started cross training a client employee on what I've been doing for the past 5 months because I'm leaving the project soon and start to look for a new project. Yesterday during our first session we discussed InfoPath Template Parts and how to build them and use them with existing InfoPath Forms. One thing that was brought to my attention again was how it interacts with an InfoPath Form when an existing control is being updated. When I discovered this the first time I forgot to blog about it but this time I didn't want to pass up the opportunity because I think it's pretty important to understand if you are going to use InfoPath Template Parts.

When building a new InfoPath Template Part you define the data source and then design the template part or you design the template part and let that define your data source. Once done you save it and then add it to the InfoPath designer when a form is being designed. At that point you then add it to the form and it magically appears and the new fields are added to the data source. All that is the straight forward stuff but now things start to get a little more complicated when you go back and modify the template part. If you go back to the template part and make a visual change (meaning not adding a new control that updates the data source) and save the changes and add it back into the InfoPath designer and update the existing control on the form everything works just fine. Now if you were to update the same template part but add a new control/field and save the changes and add it back into the InfoPath designer and update the existing control on the form everything appears to work just the same but it actually does one extra thing, it appends all the fields to the main data source again with the new one.  Logically you would think it would just update the existing structure with the new field but it doesn't.  If you're not paying attention this could cause some major problems if things are not cleaned up. To clean things up just delete the original fields and then move the new fields to the location of the original fields and rename the new fields to the names of the original fields (sorry that's so confusing).  It's pretty easy to do because InfoPath should have only added "_1" to the end of the new fields or the next number available.  If you don't do the clean up then any existing data will still reference the original fields and won't show up on the form because the form now points to the newly appended fields. This is sort of messy but I'm sure it's done this way to preserve the original structure just in case it's needed. That's the only logical reason that I can think off at this point.

After writing this I sort of think the reason for not doing it before is because it's so confusing to understand the situation without physically seeing it. With that being said I'm thinking about buying some capture software to create a video of what I'm talking about and hope this will give more clarification of what I'm talking about.

Cheers

Unrecognized namespace ASP and The language referenced by the Language attribute is not supported by Visual Studio IntelliSense

November 10th, 2007 by mlotter

Today was one of those days when you need everything to go smooth but things don't. The morning started out really well and I was making great time writing new code on my IBM ThinkPad T61 Vista machine and then I needed to transfer my ASP.NET 2.0 Ajax projects over to my VPC image to integrate my SharePoint custom web service and WMI code and that's when nothing worked correctly and my day basically started to waste away. The VPC image is fairly new but I thought it was in good working condition because that's where I had built and tested successfully an ASP.NET Web Service project but not true. When I moved over all my ASP.NET 2.0 Ajax projects and tried to open them that are when things started not to work. The first problem I had was not being able to open my projects correctly but that was an easy fix because I just installed the ASPAjaxExtSetup.msi file (ASP.NET Ajax 1.0 Extensions) but the problems that I had after that was what took so long to fix.

The projects that I copied over and opened or any ASP.NET projects created from the VPC image had the below error messages. The error messages only showed up and prevented me from compiling when I was in HTML Source view. If I was in the Design View everything would compile and publish but the only Toolbox that I had was HTML.

Error 1:

The language referenced by the Language attribute is not supported by Visual Studio IntelliSense and statement completion. Changing the language name when the file is open requires that you close and re-open the file

Error 2:

Unrecognized namespace ASP

I've never seen the error messages before and when I went searching the internet I couldn't find anything that helped me solve the problem. Then I started comparing what products were installed for each Visual Studio 2005. You can do this by opening Visual Studio and then clicking Help->About Microsoft Visual Studio and looking in the Installed Products textbox. To make things easier I clicked the Copy Info button and pasted everything in notepad. After doing a little comparison I noticed that “Microsoft Visual Web Developer 2005″ was installed on my Vista version but not on my VPC image but everything else looked the same except for the Vista specific patches. Since that was the only major difference I decided to install the missing product on my VPC image and 30 to 45 minutes later the install was done but now when trying to open the projects I got error message saying the projects were unsupported with the installed version. This was an easy one; I just needed to install SP1 for Microsoft Visual Studio 2005.

I found the SP1 for VS 2005 and started the installation and everything was going great and it was almost done and then a new error came up saying it ran out of virtual memory and gave me the below error message and link.

Error 1718: File name of file was rejected by digital signature policy.

http://go.microsoft.com/fwlink/?LinkId=73863

This error message seemed pretty familiar but when I looked through all my notes and blog posts I couldn't find anything which surprised me a little because usually I write things down so I don't have to trouble the same problem more than once. Enough about that and back to the error, I took the advice of the article and downloaded the Windows 2003 Server patch and installed it on the VPC image and then reran SP1 for VS 2005. An hour later the installation finished without any errors (hooray!) and then when I opened the projects all the errors were gone and everything appeared to be working correctly. This was a crazy mess but I'm just glad that I was able to fix it and didn't have to rebuild the VPC image.

Lesson learned for me this time around is to make sure “Microsoft Visual Web Developer 2005″ gets installed when building a VPC image. I'll remember this because I'll be building a new one this month once Microsoft Visual Studio 2008 is officially released. I saw a demo of the product at Dev Connections and it looks really impressive and the CSS and JavaScript support looks really nice.

Hope everyone has a good weekend and if you're in the Reston, VA area come out to the Nova code camp on Saturday, November 17th and hang out with everyone for the day. Some of the sessions look killer and I can't wait to attend some and speak at mine. Below is a link to the website and it has all the information that you need.

http://novacodecamp.org/

Cheers

Speaking at Nova Code Camp on November 17th

November 8th, 2007 by mlotter

The Nova Code Camp is coming up on Saturday, November 17th in Reston, VA and I'm happy to say that I will be giving a presentation at the event. The presentation is titled “Pre-populating Active Directory User Information InfoPath 2007 and C# and create a workflow with SharePoint Designer for routing”. This is the same presentation that I did at South Carolina Code Camp but I've modified it from the feedback that I got from the South Carolina Code Camp. The presentation is based off work that I did for recent project. Information on attending the code camp can be found at http://novacodecamp.org/.

I'm really excited about this opportunity because it gives me another opportunity to meet new people and to work on my speaking and presentation skills. My big dream is to get enough practice at speaking and then try to do one of the bigger conferences. Writing and speaking skills have always haunted me since being a little kid but I'm determined to improve these skills and have them as assets.

The last code camp was a blast and I'm sure this one will be to, please come out and join us for a great time.  Hope to see you there.

Cheers

Speaking at the New Jersey SharePoint User Group meeting in December

November 5th, 2007 by mlotter

After having such a great time at the South Carolina Code Camp I decided to look for other speaking opportunities to share my knowledge on InfoPath 2007, InfoPath Forms Services and SharePoint 2007 and since I've been in Newark/New York area I decided to talk with Jason Medero and Bob Fox to see if they could hook me up at either New York or New Jersey SharePoint user group.  After submitting a proposal I got accepted for the New Jersey SharePoint user group meeting and will be speaking at the December meeting.  I'm really excited to have this opportunity but little nervous because it will be my second speaking opportunity but I'm sure it will go just as smooth as previous one.  I'll be speaking on InfoPath 2007, InfoPath Forms Services and SharePoint 2007 and below is a description of what then presentation will be on.

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.

After submitting the proposal description and being accepted I found out that somebody else is already speaking at the New York SharePoint user group meeting in November on the same subject and I'm hoping that they won't be to similar to each other.  I would change it around a little if I could attend the meeting in November to see what he is actually talking about but unfortunately I'll be at the Dev Connections conference in Las Vegas that week.  Jason said not to worry about it and just do my thing and everything will be fine.

Josh Carlisle a co-worker from Raleigh will be speaking at the December New York SharePoint user group meeting.  I'm not sure what he will be talking on but whatever it is it should be great.  I saw him speak at the South Carolina Code Camp on SharePoint development and it was outstanding.

Cheers

Simple way to test out your LDAP queries without Visual Studio

November 1st, 2007 by mlotter

The other day my current client gave me a new form and workflow to build and this from was going to require me to build a new LDAP query for retrieving information.  At this point I've done about 10 different queries and the majority of the code is already done but the actual "Filter" needs to be created and I always have dreaded this part because I never found a good way to test out the filter (query) until yesterday. I was out on Google searching for something and I came across this Exchange article and it showed me how to test out my queries on AD before adding it to my C# code.  This method is going to save me so much time in the future I just wanted to share it.  The "Where Can You Use LDAP Queries?" section has "Doing a Search Using Active Directory Users and Computers" section and it shows you how to use the "Find" function from "Active Directory Users and Computers" to test queries.

Cheers

InfoPath Forms Services won't install, upgrade or delete your InfoPath 2007 forms

October 30th, 2007 by mlotter

This for all you know administrators that have SharePoint 2007 installations and use InfoPath Forms Services. Josh and I working in our development environment on Monday and we had issues uploading, upgrading or deleting forms from InfoPath Forms Services. We could see the jobs in “Solutions Management” but not in the Timer Jobs but we also could manually get the jobs to execute when we ran “stsadm.exe -o execadmsvcjobs” command. We started to Google and everything else that we could possible think of but we didn't have any luck until this morning. Josh wrote Jason Medero (brother) a long email about our problem and he said to make sure we had the DST patch installed. When we checked are environment this morning and we didn't have that installed. So with little searching we found these 2 links that guided us how to install the patches and now everything works great.  We didn't have this issue in production because we installed the patches already but forgot to do it in development.

http://blogs.msdn.com/joelo/archive/2007/10/16/sharepoint-faq-on-dst-and-october-9th-public-update.aspx

http://msmvps.com/blogs/shane/archive/2007/10/18/please-install-the-sharepoint-updates-on-your-server.aspx

Going to Dev Connections in Las Vegas

October 27th, 2007 by mlotter

The B&R team is  heading to Las Vegas for the SharePoint Connections and looking forward to having another great time reconnecting with old friends and getting a chance to make some new ones.  We had a great time last year picking up valuable tidbits from industry experts on how they were doing things with Microsoft Office SharePoint Server 2007 in there beta environments during the day and then socializing during the evening and sometimes the early morning hours.  I think my favorite session last year was a pre-conference workshop that talked about how other companies were using SharePoint in their environments and some of the bottlenecks they were running into.  This was great for me because it helped me advise my past and future clients on possible trouble areas that I wasn't aware of.

This conference should be just as exciting because to my understanding there is suppose to be information on some of the new features of the next version of SharePoint.  I heard that the next version is coming out in 2009 but I'm not 100 percent positive.  I'm also thinking about attending some of the Silverlight sessions to learn more about that new technology and hoping to have a chance to work on a Silverlight project after finishing my current InfoPath, InfoPath Forms Services and SharePoint 2007 project.

Well enough of me rambling and if you plan to be there and won't to hookup and talk about SharePoint, InfoPath or just have a drink and talk about nothing then just send me an email or post a comment.

 Cheers

Example of using a repeating section instead of repeating table for a InfoPath form

October 26th, 2007 by mlotter

Since I'm waiting on my plan again to Raleigh from Newark, I wanted to share the following little example.

Just recently we had a new form that needed to be built and it had a small unique design situation. The form had an area that needed the ability to have multiple rows and a single total field. The repeating row had a large dropdown list and 6 more fields to be scrunched onto a single line and to be honest there wasn't a way to do this gracefully with a repeating table. The designer and I had a quick IM/phone conversation about it and we decided to do it as a repeating table but also a repeating section and then we were going to have the client choose the one they wanted. Naturally she worked her magic and came up with the following examples. The “Reason” field will be the one turning into a dropdown list. The items for this field are going to have the length of 25 characters (just trying to draw a mental picture for you guys).

Repeating Table:


Repeating Section:

When the designer showed me the forms I couldn't believe my eyes how much cleaner the repeating section was. I knew the client was going to love the repeating section and I was right. Big kudos to my designer for creating another great form and I'm sure there will be many more to come.

For this form we were totaling the “Amount of Deduction” field and were having the total appear in the “Total Amount of Write-Off” control. The “Total Amount of Write-Off” is an Expression Box control and not a regular field. The Expression Box control used “sum(fieldname)” formula. We use the Expression Box control because it's a simple thing to setup and we don't have to worry about storing the total value.

Hope everyone has a great weekend and comments are always welcome.

InfoPath 2007 and SharePoint Site Columns

October 24th, 2007 by mlotter

For anybody that has looked at my blog before knows that I've been working with InfoPath 2007, InfoPath Forms Services and SharePoint 2007 Enterprise and I've been sharing some of my experiences from my projects.  In a recent post I talked about using InfoPath Forms Services and using the Content Type that it creates for Form Libraries and today I would like to continue down that road and talk about SharePoint Site Columns.  The introduction of Content Types and Site Columns in the latest version of SharePoint has brought to the table another thing that needs to be understood when building an Information Architecture.  When you plan to deploy a large amount of forms for your organization it would be ideal to reuse existing columns as much as possible to help keep things more manageable.  What this post will explain is how to use existing SharePoint Site Columns from existing forms for fields that you're promoting from new forms to a Form Library.  Content Types and Site Columns are located on Site Settings page of a SharePoint site and can be found under the Galleries column.

Each Site Column is group by different categories and the one we are interested in is the "Microsoft Office InfoPath" categories.  Everything that is included in this group is currently being used by published InfoPath forms.  If you look at Site Columns and scroll down or change the Show Group drop down to the "Microsoft Office InfoPath" category you'll notice all the promoted columns from your forms.  In the example below you will notice that there is about 12 columns and most of them are unique but some are duplicates.  The reason for the duplicates is because 2 different forms promoted the same field names but didn't reuse the existing column.

Let's take this a little further now.  Let's say you don't have 2 forms but 100 forms and half those forms promote the Divisional Controller field.  Instead of having 2 duplicate fields all the sudden you have 50 duplicate fields.  From a supportability standpoint this would be a nightmare to manage but you might be thinking that still wouldn't be a big deal because nobody comes to this page anyway and it doesn't effect anything in the libraries.  Well this is not the only place you would run into this problem.  You would also have issues in Form Libraries that have multiple forms specified.  The forms would have duplicate columns and these columns would show multiple times even in the form libraries.  The example below shows 3 forms and 2 of the forms reuses columns but the third form doesn't.  Could you imagine what this would look like if you had 4 or 5 different forms specified for this library and didn't reuse existing columns.

Enough of me telling you what could happen if you don't reuse existing columns and let me show you how to reuse columns from InfoPath designer.  In InfoPath there is two ways to promote fields as columns.  One way to promote a field is by using Property Promotion option in Form Options (Tools->Form Options->Property Promotion).

   

The Property Promotion allows you to specify what fields you want to Add, Remove or Modify.  Whenever you add a new field you get the below popup that lets you choose what field to promote but it doesn't give use the ability to choose from existing columns from a SharePoint site.  But if we look at this popup a little closer it gives you a secret message at the bottom where it could be done from. 

It tells us that other options are available on "Select a Field or Group" screen when publishing the form.  These extra options are what give you the ability to choose existing Site Columns from the Web or Site Collection that you are publishing to.  When you are publishing to InfoPath Forms Services it's really important to add the URL where the form will be activated to even though you are publishing the template initially to the file system.  It's important because this where the list of Site Columns comes from.  If fields have already been promoted then highlight the field you want to change and click the Modify button.  The "Select a Field or Group" popup will appear and now you'll have the "Site column group" and "Column name" fields. 

By default the "Site column group" field will have "(None: Create new column in this library)" and if you click the drop down then it will list all the existing groups.  If you scroll down you'll see "Microsoft Office InfoPath" and when chosen the "Column name" field changes to a dropdown list box and lists all the existing columns that you can choose from.  If you choose one of the existing columns then the form will use it instead of creating a new one when the form is activated.  InfoPath will remember the column properties that you set and it won't be necessary to do it again.  If the column doesn't exist then use the original setting and the column will be created but when you republish the form make sure the settings are updated to point to the existing column.  If not another column maybe created and you'll end up having duplicate fields.

Once the columns are created SharePoint gives the flexibility to create a new group in Site Columns and change the column grouping.  This has been done with several clients in the past and groupings are usually done by line of business or something else that is logical for that company.  Using Content Types and Site Columns has really helped my clients streamline and organize the forms in SharePoint and keep the maintenance down to a manageable level.

As always if somebody has anything to add please post a comment because I'm always looking for opinions.

Cheers