..:: I like SharePoint ::.. Rotating Header Image


Dear InfoPath, it’s time to say goodbye…

Now it is official. InfoPath client and form services in SharePoint will be retired. In many posts there were already questions about what’s going on with the form technology from Microsoft. Microsoft posted today in this blog about the future of InfoPath and form technology.

The key facts:

  • InfoPath client 2013 is the last published version
  • InfoPath Form Services are the last time published with SharePoint 2013
  • Support will go on till 2023
  • Microsoft recommends to use InfoPath further on
  • Microsoft will bring updates in the current year about new form technology and migration plans
  • Microsoft says it might be that SharePoint, Access and Word will be the next form technology

At the SharePoint Conference in March, Microsoft will announce some news on this topic:

If you’re attending the SharePoint Conference in March, you can get a sneak peek of what we’re building in “InfoPath and SharePoint Forms Roadmap” session.

The session should be available afterwards online. I think you’ll find it here.

Bye bye, InfoPath -  we had good days and bad days.

And what now? (more…)

SharePoint & InfoPath get values of a multi choice field

In one of my projects i had a form in which i am fetching data from a second list. In this second list there is a people field in which user can insert one or more people. And exactly these values should be displayed in my form. I tried a computed field, a textfield, a people field, but it only displayed the first value cause i choosed the displayname of the people field. If i select the people group it displayed everything (displayname, Userid and type).

So i googled and found this script and put it into my textfield:

eval(eval(DisplayName[ID = LookupFieldInMyForm]; 'concat(., ";")'); "..")

What does it do?

Well, in short it put each value of the people field from the second list and after each value it adds “;”. That was exactly what i needed.

If you want to use it for a listview box and you only want to extract the selected items you have to modify this part:

DisplayName[ID = LookupFieldInMyForm]

This it is reading the values.

I hope it helps you.


InfoPath Fill or empty a repeating table in browser-based form by using code-behind

InfoPath is a powerful tool which can be customized by using rules or custom code behind. At one of my projects it was necessary to display some additional information from a database dependent on which checkbox the user clicked / checked. Another request to this was that the form has to be browser-enabled cause it should be displayed in a SharePoint environment.

So i have 3 Checkboxes: A, B, C. And i have a section with a repeating table which is structured like this:

I use the onchange Event of each Checkbox which calls the function. Now let’s see how we can fill this repeating table with data: (more…)

SharePoint 2010 & InfoPath Setting date field by using rules

I already posted about how to set a date field in infopath by code behind. If you like to read this post, just look at this post. But this post i am gonna explain how to set the date field correctly by just using rules or the formula.

So we should look at first at the anatomy of the date. Mostly you know the date as

  • 18.11.2012
  • 2012-11-18
  • 11/18/2012

or whatelse. It does not matter. You have your date field and set the format as you like. But you can see that infopath saves the date always in this way:

yyyy-mm-ddThh:mm:ss – example: 2012-11-18T12:00:00

If you know that, you are able to use formulas to fill a date field with correct dates. So you have to use a “T” as separator between the date and the time.


InfoPath setting date value with code behind

Format matters! So if you ever tried to set a date value to an infopath form by using code behind, you might got this really nice displaying with a beautiful red dotted border:

Why? It’s easy – cause you have to format the date in the right way InfoPath expects it! InfoPath expects it this way: yyyy-mm-dd.

Well that’s easy. But in order to overwrite the value of a datefield, you have to insert these lines of code in order to overwrite a date field with string values! So i didn’t test it without this function:

public void DeleteNil(XPathNavigator node)
if (node.MoveToAttribute("nil", "<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"))

After that you can use this function in order to set attribute and overwrite the field by setting the value as you desire.

//In order to overwrite the field with datetime

//Opening the access to the field of the form
XPathNavigator navForm = this.CreateNavigator();
XmlNamespaceManager NS = this.NamespaceManager;

DeleteNil(navForm.SelectSingleNode("/my:meineFelder/my:CreationDay", NS));

DateTime getDate = Convert.ToDateTime(dr["CreateDate"]);

string convDate = getDate.ToString("yyyy-MM-dd");

navForm.SelectSingleNode("/my:meineFelder/my:CreationDay", NS).SetValue(convDate);

And it looks like a normal date field:

As you can see the red dotted validation does not show up.

..:: I like SharePoint ::..