Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have added the following field to a custom list definition based on custom content type.

<Field Type="User" DisplayName="Line Manager" List="UserInfo" Required="FALSE" EnforceUniqueValues="FALSE" ShowField="ImnName" UserSelectionMode="PeopleOnly" UserSelectionScope="0" ID="{098E0A5A-8187-481E-B155-B674A406EEAF}" SourceID="{53ca79b7-9ffa-457d-aff8-c71508b09cb1}" StaticName="Line_x0020_Manager" Name="Line_x0020_Manager" RowOrdinal="32" Filterable="TRUE" FromBaseType="TRUE"/> 

I am putting [Me] filter on this column in a view. The filter is not able to filter the records for the logged in user.

Am I missing something?

EDIT

Interestingly if I add similar column through SharePoint UI the filter works fine. Any clues, ideas welcome.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Phew!! This got resolved and was one of the most frustrating things. I am not sure if this was an issue with the way I defined the schema below or whether it’s a bug with SharePoint.

I ran a profiler to see what’s going on under the hoods and found a query (pretty huge for me to digest ) where in the RowOrdinal was being used extensively with a predefined value as 0 or 1. As I was using “32” as RowOrdinal, it looked shady to me. I changed it to “0” and bingo!! The filter started working.

BTW here is what MSDN says about it – "Optional Integer. Specifies the database location for the field."

Doesn’t appear like it should take part in records filtering.

So, to close the field should be defined as

<Field Type="User" DisplayName="Line Manager" List="UserInfo" Required="FALSE" EnforceUniqueValues="FALSE" ShowField="ImnName" UserSelectionMode="PeopleOnly" UserSelectionScope="0" ID="{098E0A5A-8187-481E-B155-B674A406EEAF}" SourceID="{53ca79b7-9ffa-457d-aff8-c71508b09cb1}" StaticName="Line_x0020_Manager" Name="Line_x0020_Manager" RowOrdinal="0" Filterable="TRUE" FromBaseType="TRUE"/> 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.