SharePoint 2010 & InfoPath: Lookup with formatted dates is possible
I created a dataconnection to the calendar list, then i added a dropdown to my form and choose the dataconnection as source. I set the filter to starting date (Event Date) to greater than today and the result does not make me smile:

Can anyone tell me why the output is so unpretty? I expected to get a format like 17.05.2012 13:00:00. Anyway why can’t i tell the dropdown how to format the values? I can’t show this my client and tell him “Well that’s SharePoint o InfoPath”. So i tried it several things till i came to the desired solution.
The source is the source
That’s true for this. At first you have to create a calculated column in your calendar list with this formular:
=TEXT([ColumnName],”dd.mm.yyy hh:mm”)
Remember that english / german might need other formulas like a semicolon instead of a commata or at the date format.
After that i updated my data connection in the form and added the new column. Now i can choose that the new column should be the display column in my lookup and it will display the values like i wanted:

Great, it is possible with a little trick with standard features, but it surprised me that i had to use this workaround.
Can anyone tell me why the output is so unpretty? I expected to get a format like 17.05.2012 13:00:00. Anyway why can’t i tell the dropdown how to format the values? I can’t show this my client and tell him “Well that’s SharePoint o InfoPath”. So i tried it several things till i came to the desired solution.
The source is the source
That’s true for this. At first you have to create a calculated column in your calendar list with this formular:
=TEXT([ColumnName],”dd.mm.yyy hh:mm”)
Remember that english / german might need other formulas like a semicolon instead of a commata or at the date format.
After that i updated my data connection in the form and added the new column. Now i can choose that the new column should be the display column in my lookup and it will display the values like i wanted:
Great, it is possible with a little trick with standard features, but it surprised me that i had to use this workaround.
No comments:
Post a Comment