Monday, February 9, 2009

Naming Conventions

The raison to write this article is because I still see many multi-nationals struggling with naming conventions within their IT department.

Naming conventions are as old as IT itself, but still many companies do not have proper naming conventions, and even worse, they use internal of external sources to create one.

What is the reason to have Naming Conventions in the first place?
The main reason to introduce naming conventions is to :

  • - to reduce the effort needed to read  and understand source code
  • - to enhance source code appearance

The most important reason is the first one, to reduce the effort needed to read and understand source code

Code must be easy and quick readable and understandable when new employees (internal of external) enters the IT department or when other teams takes over the project..

The answer I gave to my customers is very easy: take the naming conventions found on the Internet.  The goal is not only to have company related Naming conventions, but general naming conventions.

New employees or external consultancy will loose less time understanding the general naming conventions, as they were used too with their previous work, instead of learning the company related ones, which will never be followed 100%.

Some links:

BizTalk: http://wes.fehler.ca/weblog/biztalk/2005/01/biztalk-naming-conventions.html

General Naming Conventions: http://msdn.microsoft.com/en-us/library/ms229002.aspx

And many more are available on the net. 

 

Don’t let your IT department loose time to write company related naming conventions, re-use them!

Monday, January 19, 2009

Automatically add new row to repeating control

Some time ago, I wrote some post how to add a new record to a repeating table, using some code.  The code was working very well, but an answer of Jimmy (Japan) brought me to another solution. 

The code behind the Add New Record button is very simply and we don't need the overhead of opening the manifest.xsf file anymore.

The code is:  (c#)

CurrentView.ExecuteAction(ActionType.XCollectionInsert, "group2_1");

Where

Group2_1 can be found in the Advanced tab of the repeating table, the property called XmlToEdit

Friday, January 16, 2009

Thank You - TOP 100 and Cascading Dropdows

I want to thank all of you interested in InfoPath.  I became a TOP 100 contributor on the InfoPathDev.com website, and I see several times that the solutions I gave are working.

Also when searching for How to use Cascading Dropdown ListBoxes with InfoPath Services (webbassed) I see many companies implemented the out-of-the-box solution I proposed in my article and many others are using the link in their blogs and replies on forums.

Thanks!

Monday, December 8, 2008

Check if combination of values is already entered, using Repeating Controls

Several posts explains how to use drop down list boxes in repeating tables, assuring that the users can only select values which are not selected in previous rows.  This article describes how to extend this validation, to assure the combination of several fields are not entered in previous rows.

Solution:

1. Within the repeating node, add ahidden TextBox, called UniqueValue
2. Set the Default Value to Concat(field1, field2,..)    Field 1, Field 2,... are the fields that will make the row unique
3. Add the following rule to the newly created field:
       Condition: The Expression
      
Expression: ../my:UniqueValue = (../preceding-
       sibing::my:Group2 | ../following-
       sibling::my:Group2)/my:UniqueValue)

    Action:
Show Dialog box with some message that the
     combination of fields already exists


Group2: is the name of the repeating node within the data-source

Tips: Remove Administrator Approval when publishing the InfoPath form to SharePoint

Sometimes, when publishing an InfoPath form to SharePoint, the Publishing Wizard tell you that the form must be approved by an administrator.


This is a normal behavior when your form contains code, but what if you are sure your form doesn't contain custom code.

To clean up the link, go to
  • - Menu Tool -> Form Options
  • - Select Programming
  • - Click on the Remove Code button in the Programming
  •   Language Section

    this action will remove the link to the Code Project.  Once this link is available in the Form, even without code you wrote, the Administrator Approval is required.

Wednesday, November 19, 2008

Cascading Drop downs in InfoPath Web Forms made easy

To create user‐friendly web forms, cascading drop down list boxes is a must, but InfoPath Form Services doesn’t allow you to use them, like you can use them with InfoPath Client.
(Filter Data on DataConnections/DataSources are not allowed with InfoPath Web Forms)


This article explains how to use Cascading Drop down list boxes within an InfoPath Web Form in a very easy and re-usable way.

Please download the PDF file containing the step by step guide

HOW_TO_use_Cascading_Dropdown_ListBoxes_within_an_InfoPath_Web_Form.pdf

HOW TO make InfoPath Forms Readonly when SharePoint Worflow is started

When users filling in an InfoPath Form and submit the form to a SharePoint library, a workflow can be started (ex. Approval). In many cases we don’t want the user changes information after the workflow is started.

This works with SharePoint Workflows and Nintext Workflows


Please download the PDF file containing the step by step guide:

HOW_TO_Make_InfoPath_Forms_Readonly_when_a_SharePoint_Workflow_is_started.pdf