Sunday, October 28, 2007

Added RRS Feed to My Blog

Today I found a way to add RRS feed to my blog. You will find RRS and a link in my blog page on lower right side. I'll update my feed so that any subscribes can get updated posts on my blog.

I have been using RRS feed a lot for many web sites. It is very convenient way to access my favorite sites and read new posts/feeds. For example, I have added a RRS folder in my browser's Bookmark Toolbar. When I find a good site with RRS feed link, I always add the feed to my RRS folder. As a result, I can get latest updates on these pages when I open my browser.

BBloger provides a setting feature to add RRS. There is a Site Feed Tab in BBloger's settings. Based on the recommendation, I used FeedBurner to generate my feeds. I guess that I have to log in to the link to update my feeds whenever I update my blogs. Hopefully, you will like this feature if you are interested in my blog.

By the way, I have to add my RRS link manually from my blog template. BBloger's templates are very easy to update. There are many commented-out paragraphs in the template. I removed the comment tags and added my RRS text and link, then my RRS is available on my blog page. It's great and exiting to add this feature to my blog!


Hide/Display Debug Fields for InfoPath 2003

I have been working on a InfoPath 2003 project for about one month. I have put some hidden fields on the form for debug or values which are used by some Rules but not for display purpose. At the beginning, I thought to use other visible fields as condition for their display condition since fields/controls do not have hidden property I can set directly. For example, I set those hidden fields' conditional format as hidden if other visible controls is present.

However, when I want to set those fields visible for debug purpose, it is very tedious to go to each control to enable their visibility, specially when there are many hidden fields. What I need is a quick way to set their visibility by one flag.

Finally, I found a way to do that. There is place I can set Rules for Form Open, that is the place I can set a variable or field to true or false. I named this field as SetHiddenFieldVisible as boolean. All the hidden fields/controls conditional format is changed to hidden if this var is false, or 1 = 2. This makes my debug much easier. By using this, I found several bugs. For example, some hidden fields were set as invalid values (string to a boolean value). Because they are hidden fields, I could not see the error when I got an error message. When I turn on the visible flag, I could see these fields marked as red right away.

By set some initial values when the Form is opened, I could set many initial values used later on in the form. This simplifies my Rules and Conditional Format settings, and it is easy to update.


Friday, October 26, 2007

Great Tutorial Articls about CAB/SCSF

I posted a question to CodePlex's Smart Client Guidance Discussion on the difference between Items and SmartParts collections. I got very good post back to explain the difference.

At the same time, I found a post about CAB/SCSF tutorial articles by Rich Newman. This link provides great articles on CAB. I have been working on CAB for months. At first, I was lost about this complex application block framework. It is very complicated. It took me about one week to just get very basic understanding of these mysterious blocks. This link provides much clear explanation and description about CAB structure and patterns used. It is a great site!


Thursday, October 04, 2007

Use Data Connection in InfoPath 2003

Recently, I was asked to work on an InfoPath form project. The form can be opened from a SharePoint intranet site. The form contains several parts to be filled by different people. The person who fills the form can select the next person from company's employee list to fill the next part. If the next person approves the application form, he/she will continue to fill the form and select another person for approval or to fill. If he/she rejects the form, the previous person will be notified.

I used a Drop-Down List Box control for selecting an employee. The DDL box is filled with employees by using a web service (RetrievingAllEmployees method). I set the binding Value to @Email (property of employee), and Display Name to @FullName. However, the problem is that I cannot use the selected employee full name (displayed in the DDLB) in the next part, for example, a Text Box, because the Value of DDLB is an email address.

I realized that in the same web service, there is a method called as RetrieveEmployeeByNetworkUserName, which takes NetworkUserName as an parameter to get an employee object back. I tried to add this as an Data Connection to the InfoPath form, but I did not know how to use, or how to set its parameter.

InfoPath is new for me. There are not much information available on the Web. I tried to post several help questions to Microsoft InfoPath Forum, but no answer yet.

After several hour tries and tests, I finally found a way to solve the problem, using this web service method with parameter as a Data connection. Basically, this data connection has two sets of data (through InfoPath GUI):

  • query fields which are mapped to methods parameters, ie, NetworkUserName, and

  • data fields as properties of returned object, ie, employee.

Base on this information, I figured out that I can use this connection dynamically with the DDLB's Rules (when an item is changed). I added a Rule to the DDLB with the following actions:

  • Set DDLB's value to the data connection's query field NetworkUserName,

  • Use Query Data Connection action with the data connection,

  • Set the data connection's @FullName property value to a text box, and

  • Set the data connection's @Email property value to another text box.

Whalla! This works perfectly. Of course, I changed the DDLB's binding Value to NetworkUser. By using the data connection with parameters, I can let use to specify an employee, and then the employee's information can be obtained easily!