Monday, June 15, 2009

Silversands Associates iPhone ready

The website of SilverSands Associates is adapted to have a real iPhone experience, when surfing to the website with an iPhone.

Have a look.
From the iPhone:


Filter SharePoint List by Workflow Status

Often we need to filter a SharePoint list by  the status of a workflow.

This is rather simple and can be done in the same way as filtering any other field.

The only thing you need to know is that the status of the workflow is an integer, not a text.  So we can’t add a filter like ‘Workflow name’ IS EQUAL TO ‘In Progress’

The following list gives the integer values of each status.
This data can also be used within InfoPath to change the layout of the form depending on the status of the workflow.

A blog was written earlier how to do this:

List of Workflow statuses

  • 0 - Starting
  • 1 - Failed on Start
  • 2 - In Progress
  • 3 - Error Occurred
  • 4 - Canceled
  • 5 - Completed
  • 6 - Failed on Start (retrying)
  • 7 - Error Occurred (retrying
  • 15 - Canceled
  • 16 - Approved
  • 17 - Rejected

  • Prepare your InfoPath for deployment and be sure your form is generic

    When creating an InfoPath form, we often use the data connections.
    InfoPath makes it easy to work with data connections, but the issue is that the links to the SharePoint library or database is saved in the InfoPath Form.

    What if we have to move the SharePoint Library to another place?
    Ex. Test -> Production Environment

    What if we change the name of the SharePoint Library we want to submit too?

    We can’t always return to our InfoPath Designer, make the changes and publish again.

    Happily for us, InfoPath 2007 with SharePoint has a solution.  SharePoint offers a Data Connection Library.
    Within the data library we place our InfoPath Data Connections.  When changing database password, changing SharePoint Library names or paths etc we just change the Data Connection file in the Data Connection Library and your InfoPath will continue working.

    The next part will explain you step by step how to do this.

    To Create a SharePoint Data Connection Library if the library does not yet exists.

    1. Browse to an Office SharePoint Server 2007 or Office Forms Server 2007 site on which you have at least Design rights. If you are on the root site, or portal, go to the Document Center or create a new site before proceeding to the next step.

    2. Click Create on the Site Actions menu.

    3. On the Create page, click the Data Connection Library link in the Libraries section.

    4. On the New page, type a name for the library and click the Create button.

    5. Copy the URL of the new library.

    Update your InfoPath file

    1. Create a data connection in InfoPath, following the wizard

    2. After creating the data connection, you see the list of data connection.

    Select the newly created data connection

    3. Click on Convert

    4. On the Convert Data Connection dialog box, enter the URL of the data connection library that you previously copied.

    5. Delete "Forms/AllItems.aspx" in the URL.

    6. Enter a name for the data connection file at the end.

    7. Click OK.

    8. Confirm that the data connection has been converted successfully by examining the Details section of the Data Connections dialog box while the converted data connection is selected.

    Don’t forget to publish your InfoPath Form.

    You will see that under the Data Connections Library, a new file is added.  This file needs to be updated when moving environments, changing databases, changing submit libraries etc.

    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:


    General Naming Conventions:

    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");


    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 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.


    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.


    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-

    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