I've created a custom field in SharePoint 2013.
<FieldTypes>
<FieldType>
<Field Name="TypeName">CrossSiteLookupField</Field>
<Field Name="ParentType">Text</Field>
<Field Name="TypeDisplayName">Cross-Site Lookup Field</Field>
<Field Name="TypeShortDescription"> Cross-Site Lookup Field </Field>
<Field Name="UserCreatable">TRUE</Field>
<Field Name="ShowOnColumnTemplateCreate">TRUE</Field>
<Field Name="ShowOnListCreate">TRUE</Field>
<Field Name="ShowOnDocumentLibraryCreate">TRUE</Field>
<Field Name="ShowOnSurveyCreate">FALSE</Field>
<Field Name="ShowInFileDlg">FALSE</Field>
<Field Name="Sortable">TRUE</Field>
<Field Name="Filterable">TRUE</Field>
<Field Name="AllowBaseTypeRendering">FALSE</Field>
<Field Name="CAMLRendering">TRUE</Field>
<Field Name="AllowGridEditing">FALSE</Field>
<Field Name="FieldTypeClass">CrossSiteLookupField.CrossSiteLookupField,$SharePoint.Project.AssemblyFullName$</Field>
<Field Name="FieldEditorUserControl">/_controltemplates/15/CrossSiteLookupFieldAdminTemplate.ascx</Field>
</FieldType>
</FieldTypes>
My CrossSiteLookupField class inherits from SPFieldText. The method 'public override string GetValidatedString(object value)' returns e.g. '4;#Test' (like a SPFieldLookup). Now the filter shows '4;#Test' but I would like the have 'Test' displayed only. The second question is: If I have a multivalue separated with '; ', I would like to have two filter rows.
The functionality should be equal to Lookup and LookupMulti.
How can I do this?
Thx