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 work on the edit form of an external list. I can pick items from an associated content type with a picker. There is the option to "Check if item exists", but currently it only accepts IDs. Can I change this checker to accept different properties, and how?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

If you try to check an item by something other than the ID, the ReadList operation of the associated item is used. (In case of IDs it seems to be the ReadItem operation.) You need to implement a wildcard filter against the property you want to search after in the checker, which also enables the search field in the picker.

Filter Type: Wildcard
Data source element: your property
Default value: %

share|improve this answer

Thanks for that solution, @AGuyCalledGerald.

Because the Business Connectivity Services External Types I was creating used SQL stored procedures instead of direct table access, I initially did not have a title-like filter parameter to use.

So I had to add a title parameter to my SQL stored procedure in order to make the search work. Here is the example (for an entity representing a College Campus):

CREATE PROCEDURE [ict].[usp_Campus] 
  @campusId INT = NULL, -- if NULL, return list
  @campusTitle NVARCHAR(50) = NULL -- for wildcard searches in SharePoint Business Connectivity Services External Picker controls
AS
BEGIN
  SET NOCOUNT ON;
  SELECT *
  FROM ict.Campus
  WHERE (@campusId IS NULL OR CampusId = @campusId)
    AND (@campusTitle IS NULL OR Campus LIKE @campusTitle + '%')
  ORDER BY Campus ASC;
END

After applying your wildcard filter solution to the CampusTitle parameter in the External Content Type Read List operation in SharePoint Designer 2010, the picker control in forms now recognizes campus title and not just the numeric ID. And you may just need to type in the first few letters as well.

This is most helpful as these text fields now work like the People controls that users are familiar with from elsewhere (like Microsoft Outlook).

share|improve this answer

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.