Jul 16, 2008

SharePoint Lookup Field with Picker

I'm proud to present you the "Lookup Field with Picker". I've just released it on I Love SharePoint. Just forget the fuc**** dropdowns!

Features:

  • Single- and multi-lookup
  • Searching
  • SharePoint Solution Package (wsp)
  • Click & Enjoy installation (batch file;-)

Screens:

  • Add the field to List or Content Type

image

  • Create a new item and there will be a picker instead of a dropdown!

image

  • Click on the picker, search for an item and choose

image

  • And there it is

image

More coming soon...

Bye,

Christian

46 comments:

Anonymous said...

I get the error "There was an error on the callback" in the popup window, when I try to make a search. Do I need to install the Ajax Extensions to use this feature ?

Christian said...

Hi,

you don't need to install the AJAX Extensions, although it uses an AJAX like approach (ICallbackEventHandler). Which Version do you use? I know this error and it shouldn't be in Version 2.0.

Bye,
Christian

Anonymous said...

Hi,

I use the "Lookup Field with Picker V2.0" downloaded from CodePlex.
I installed it in two different environments and I get the error on both.

Christian said...

Hi,
I've just installed it on another machine and it works - weird. Have you SharePoint SP1 installed? When do you get the error exactly? Stack trace? I have .NET 3.5. on my machines but should not be required.

Anonymous said...

Hi,

The callback error only occurs when a list of results is expected. If the search result count is exceeded, the max count error displays. If no matches are found, no error occurs.
I have SP1 only in one environment and I get the error on both.

Christian said...

Hi,
at the moment I haven't any idea what went wrong. If you could provide a Stack Trace please send to christian.glessner@dataone.de. I'm next week in the office again.
Bye,
Christian

Christian said...

Hi,

issue is solved in Release 2.13.

Bye,
Christian

Anonymous said...

Thanks for this great control. I helps a lot.
I have one question regarding the search result in the dialog Webpage: the scrolling through the result set is very slow.
The list with the lookup field column is about 300 items long. The lookup list itself is 5 items long.

Christian said...

Hello, I know the performance issue and will fix this in the next release. At the moment I can't say when this will be. Thanks for your feedback!
Bye, Christian

Anonymous said...

Hi,
your feature is really great. but now I need the lookup to work on a list in a different sp site. Is it possible to change something in your "SharePoint Lookup Field with Picker" to work with different sites?

Christian said...

Do you mean a different site collection(SPSite) or just sites(SPWeb)?

wojtek said...

My problem is that I've site http://portal/sites/site_no_1 where is my list I want to use with your lookup picker. But I need do the same in http://portal/sites/site_no_2, http://portal/sites/site_no_3 etc sites. Now I'll have to copy my list to all of these sites. Is it possible?

Christian said...

Hi,
a picker column instance can only be reused within one site collection. Means if you create a picker site column on the root site of your site collection, you can reuse it in subsites, but not in another site collection.
Bye, Christian

Anonymous said...

Hi,
cann you explain how to use this picker in other language environment? I droped my log at the discussion page.
Thx
Bozo

Christian said...

To use the picker with other languages, you have to copy the resource file "iLoveSharePoint.Fields.LookupFieldWithPicker.resx" (where to find see readme.txt) and rename it to "iLoveSharePoint.Fields.LookupFieldWithPicker.[language-culture].resx" e.g iLoveSharePoint.Fields.LookupFieldWithPicker.de-de.resx for German. If you want, you can translate the resource file with a resource editor like VS. Let me know if you have translation and want to share with others.

Anonymous said...

Nop, that did't work. I've got the same idea, but unfortunately other errors accured.

Christian said...

Hi Bozo,
in your log snippet are some resource file errors which have nothing to do with the picker. Any other problems on the server? Do you use WSS or MOSS? Which language template you have chosen for your test site? Have you done an iisreset?
Bye, Christian

Anonymous said...

Hi, I use wss 3 on a remote sql server 2000 database, and there's also search server express installed.
Interesting, on a test server there's also slovenian language pack and it works just fine on both, english and slovenian site.

So it must be something else, hmmmm.
I was also getting a memory error but that solved a hotfix from ms.

If I find anything that helps, I'll let you know.
Thanks,
Bozo

Anonymous said...

No luck, must uninstall it.
Thanks anyway.

Bozo

Anonymous said...

Is there a way to Lookup a field from a list of a SubSite ?

Christian said...

Sorry, unfortunately not. You can only lookup parent site lists in child sites using site columns.

Marco Valli said...

Good work!!!!

Italian Translation here: http://cid-f59af3ad6493a526.skydrive.live.com/self.aspx/Pubblica/iLoveSharePoint.Fields.LookupFieldWithPicker.resx

PingBack from http://vallimarco.spaces.live.com/blog/cns!F59AF3AD6493A526!256.entry

Anonymous said...

Hi,

is it possible to restrict the content of the list to a subset?
Meaning I'd like to pre-filter e.g. on a column "Country" with a value of "Germany". the value would come from another field in the current record.

Christian said...

Hi,

unfortunately this is not possible at the moment. You can create a feature request on the CodePlex project. Actually I want to develop a new release. But time is very limited. Maybe the cascading dropdown will help you http://datacogs.com/datablogs/archive/2007/08/26/641.aspx

Bye, Christian

Anonymous said...

Hi,
Absolutely brilliant!!!

Is there anyway that we can addadt this code to use a database table/view instead of a list?

Regards,

Christian said...

Unfortunately there isn't the possibilty to user a database or a web service. You use the Business Data Catlog instead (only MOSS Enterprise).
Bye, Christian

Anonymous said...

Having a problem integrating this with other components. It seems it does not look like a sharepoint lookup field to sharepoint and cannot be used in apps that use spquery to access data?

AboutDev said...

I keep seeing this error come up

1d22ea11-1e32-424e-89ab-9fedbadb6ce1
Exception setting "SchemaXml": "Non-supported field type change.
The field cannot be changed to the new type. Please check the new type and try again."
At C:\Documents and Settings\xgrmmart\Desktop\icgpm\deploy\ConvertLookupToLookupFieldWithPicker.ps1:29 char:8
+ $field.S <<<< chemaXml = $schema.PSBase.OuterXml;


No idea why its not working....ran perfectly in the test environment.

Any help is much appreciated. Thanks.

Christian said...

Hi,
don't know this error. Maybe the field you want to convert to lookup with picker isn't not a standard SharePoint lookup. Or the lookup with picker isn't properly installed and SharePoint could not resolve field type. This is easy to check just add a lookup with picker to any list via the UI.

Bye, Christian

Anonymous said...

Hi, this webpart was spot on!

However I have encountered some difficulties when it comes to saving a document from Office Word 2003. In the Web file properties form the picker isn't available? The column is set to required field.

Do you have a possible solution to this, or maybe some ideas to pinpoint me in the correct direction?

aboutdev said...

Thanks Christian. I managed to fix the issue by undoing the installation and reinstalling it. Works well now.

I did want to ask one more thing. How can I set the value of the textarea based on javascript? I have tried to use the textarea's value property but that doesn't work in IE.

Any suggestions?

Thanks.
AboutDev.

Christian said...

Hi,

unfortunaltely haven't any hint for you.


Bye, Christian

Anonymous said...

ShurikEv
I translated resx-file to russian language. If you need it, please write me to shurik_ev@mail.ru
I send it you

Anonymous said...

Im getting this error when deploying the installed solution to a web app - https://sharepoint.xx.com.au/ : CortexSharePointWS : Error: Cannot locate the section in the web.config file for this site. Controls in the specified assembly cannot be marked as .

Geert van Raaij said...

Hi Christian,

any news on your Tweet:

"Working on Lookup Field with Picker to get it ready for SharePoint 2010. Seems the cust editor will cause the most effort.
12:32 PM Apr 6th"

Have the same issue :-(

Christian said...

Hello,
hopefully next week...
Bye, Christian

Christian said...

Hello,

I've just published the first draft of Lookup Field with Picker 2010: http://ilovesharepoint.codeplex.com/releases/view/44989

Deploying the solution on your SP2010 should upgrade the broken SP2007 picker.

Feeback would be appreciated.

Bye, Christian

Adnan Ahmed said...

Hi,

How can I declare iLove SharePoint Lookup Field with Picker control in the page layout page by using SPD for my publishing template.

Thanks
Adnan Ahmed

Christian said...

Adnan, I've never tried this, but I believe it should work. It might could be that SharePoint Designer doesn't support drag & drop for custom fields. Just look what SPD generates for a builtin lookup in the markup. Copy the tag and replace the field name with the field name of lookup field with picker.
Bye, Christian

ralfhappe said...

Hi,

I have deployed the LookUp Field in a SharePoint Wss 3.0 Sp2 enviroment.

If I use I get after i clicked the search button the Error: There was an error in the callback.

Do you have any idea how i can resolve this error?

regards, jonnyenglisch

ealobna32 said...

Hi Thanks a lot for this great tool

I have one issue regarding the sort (by default sorted by ID)

My client requirements need the list sorted alphabetically

So can u update the code in the Query?


query.ViewAttributes =



"Scope=\"Recursive\"";
query.Query =

string.Format("<{0}>{3}"
, searchOperator ??

"Eq"
, searchField.Id.ToString()

, valueType

, search

, searchField.Id.ToString());



Thanks

ealobna32 said...

Hi Thanks a lot for this great tool

I have one issue regarding the sort (by default sorted by ID)

My client requirements need the list sorted alphabetically

So can u update the code in the Query?


query.ViewAttributes =



"Scope=\"Recursive\"";
query.Query =

string.Format("<{0}>{3}"
, searchOperator ??

"Eq"
, searchField.Id.ToString()

, valueType

, search

, searchField.Id.ToString());



Thanks

Anonymous said...

Hi,

i have two problem
1)i want to use lookup and calculated fields as searchable cloumn in picker,
2) how to edit your field in datasheet view (the cell is readonly)
Please help me

thanks.

Christian said...

Hi,

both is unfortunately not supported. This is a restriction of the SharePoint API.
1)i want to use lookup and calculated fields as searchable cloumn in picker,
2) how to edit your field in datasheet view (the cell is readonly)
Bye,
Christian

Anonymous said...

Hi, great tool but I have problem with formating the output. I'm trying to copy results of Lookup field to another List item formated as string. After copying new string starts with "number#", I supose that "number#" is a lookup field item id. Could you help me to remove this from output ??

Anonymous said...

It's awesome to use sharepoint lookup field with picker but the problem is that when we try to access the list items on the basis of 'lookup field with picker' fields value using CAML query than it requires to define the the field type in CAML query.
so can anyone please tell me what type we will use in CAML query for this field,
Thanks in advance.