Project Description
Microsoft Sharepoint Server 2007 lookup control with element picker for custom list.
This control is useful if you need to choose lookup data from large lists. This control supports single and multi select mode.

adding.png

newitem.png

dialog.png

newitem2.png
Last edited Jul 30 2008 at 3:18 PM by whtiger, version 3
Comments
salwa wrote  Jun 26 2008 at 5:52 PM 
Dear Sir,
Thanx for your great effort in that wonderful piece of art. I try to install your control by running the patch and add the dll to the target site and add it to my safe control in web config. But, when i used it it give me this error "Only PickerDialoge types can be used with the dialog. The type should be configured as a safecontrol in this site". please give me the solution and the right way to use your control as soon as possible.

whtiger wrote  Jul 2 2008 at 10:27 AM 
Dear slawa,
You need to add
<SafeControl Assembly="LookupWithPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e1eb4ce568bda77d" Namespace="LookupWithPicker" TypeName="*" Safe="True" />
into your web.config file.

netangel wrote  Jul 2 2008 at 2:55 PM 
Nice control,
I've installed it using recomendations above and gacutil - and it works. Interesting idea. Features that wil be desirable to add:
- integration with Microsoft Office clients (Word, Excell a.o.)
- possibility to change column from wich get information (not title only)

marcvaneijk wrote  Jul 19 2008 at 3:23 PM 
Dear Whtiger,
You don't know how happy you make me with this custom field type. This is what i'm looking for the last 2 years. You earn a medal for this. They should put this in an update as soon as possible.
All is working very beautiful, with some small exceptions:
- when you enter a new item (which uses a "lookup with picker" column to another list), the item is created succesfully and the list is show with the item you just created. When you click on the item you just created, the default dispform.aspx should display the item, but instead an error is shown. The edit item page (editform.aspx) is working fine.
- when you refrence a list with the "lookup with picker" which has multiple items with similair characters in the title (for example AudiRS4 and AudiRS6). And you enter a new item type in Audi in the "lookup with picker" column and you click the "check names" button the the column is resolved to the first item it finds in the other list (in this example it will resolve to AudiRS4). Maybe you can get it to work like the AD User picker (when you type a part of the name and you have multiple matches in AD the the typed text will be underlined in red. When you click on the underlined text a small popup is shown with the matching names and you can choose the correct one.
Two desirable features to add (in addition to the ones that netangel specified)
- autocomplete on the typed text (like http://www.codeplex.com/autocompletelookupax)
- choose the column (from the referencing list) to display when the item is created
I'm even willing to make a small donation if you can help me

whtiger wrote  Jul 30 2008 at 1:48 PM 
marcvaneijk: Thank you for your comments. I'll try to fix these issues ASAP.
PS: Donations are not needed ;-)

whtiger wrote  Jul 30 2008 at 3:01 PM 
Lookup With Picker 1.1.0 is released

Saulius wrote  Aug 1 2008 at 6:55 AM 
It's a good control, and good idea. But please check installation (install.bat) file. It's refer to "%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u LookupWithPicker /f
and fails if the is no Microsoft Visual Studio 8 installed on server. Maybe it's better to include gacutil.exe into inslatalion pack.

Bautz wrote  Aug 1 2008 at 8:16 AM 
This was very good!
Is it possible to view more fields in the search box in addition to ID and the selected column? For example search for the country and be able to find and select the city?

Regards
Alexander

Bautz wrote  Aug 1 2008 at 10:45 AM 
Two more thing:
- The default search column is ID regardless of what column i select - is it possible to default to the selected column so that i dont have to change before searching?
- When lookup from a calculated column (great that you can lookup on calculated columns!) the format of all search resaults starts with string;#. Can this be avoided?

Keep up the good work!
Alexander

whtiger wrote  Aug 4 2008 at 2:40 PM 
Release 1.1.1
1) Default search by selected column, not by ID
2) Fixed calculated fields

joships wrote  Aug 4 2008 at 4:21 PM 
Thanks for the nice job. Can I use this to connect to data from SQL?

Below is what I want to do:-

In newform/editform.aspx, I have employeeID and employeeDepartment. I want employeeID to be read from SQL table and then employeeDepartment also from SQL table but only for that employeeID that was selected by the user. Please suggest if this is possible or any workaround for the same. Also if u have seen any other project (codeplex or others) to accomplish this.

Many thanks

Bautz wrote  Aug 5 2008 at 12:35 PM 
Hello again,
Thank you very much!
This custom field type fits my need exactly - now with the calculated field lookup fixed i am very pleased.

Regards
Alexander

joships wrote  Aug 6 2008 at 3:40 PM 
Hello Whtiger/All,

I would like to know whether I can use this tool such that I can create a list (that will have data read dynamically from SQL). My main goal is to provide a popup window on employeeID such that is shows from a SQL table.

Is this acheivable through this tool or any other?

Please reply.

sameena wrote  Aug 8 2008 at 10:40 AM 
Hi,
I have a custom picker dialog control developed . I need help to add another functionality . When we get an unresolved entity back (with the no exact match found message) and click on the unresolved entity we get a pop up or menu template.
How can we change this menutemplate to show entities which are similar to the unresolved enities for user to choose ??

mattzer wrote  Aug 13 2008 at 9:17 AM 
When i use this Lookup crosssite, there´s a problem with the search window. There is a "list does not exist exception".
Hope you can fix it!

Thanks for the the support :)
regards
Matthias

whtiger wrote  Aug 14 2008 at 12:36 PM 
Hello Matthias,
Try version 1.1.2. I've added some cross-site workaround.

whtiger wrote  Aug 14 2008 at 12:53 PM 
Hello joships,
No, this control can lookup data only from Sharepoint lists.

aaclage wrote  Aug 15 2008 at 12:24 PM 
Only to congratulate your control, this and other controls helps a lot.
Codeplex is turning a big database of sharepoint controls.
This is great stuff....

madtie wrote  Aug 18 2008 at 5:12 PM 
Hi, that is a great feature! I've been looking for this for weeks.
I have only one problem. If the column we are looking for is a number, and we click to verify the name, it searchs the ID and changes the number we've put in. If, for example, I put 1 and click verify, the column will change to the first item in that list.
I hope you understand what I just wrote! =)
Thanx in advance.

whtiger wrote  Aug 19 2008 at 7:28 AM 
Hello madtie,
Try 1.1.3

mattzer wrote  Aug 19 2008 at 8:30 AM 
Thanks, this works Great for me, but i think i´ve found another bug
When using this column with workflows, for example as Body in a email, it returns IDofELEMENT#;NAMEofELEMENT(example: 1234#;coffee ).
Is there a way to trim the everything exept the NAMEofELEMENT ?
Thanks so much!

madtie wrote  Aug 19 2008 at 9:29 AM 
Excellent! ;) Thanx!

whtiger wrote  Aug 19 2008 at 2:23 PM 
Hello Matthias,
This field type works as SPLookupField. You can pass value of this control to SPLookupFieldValue and read LookupValue from it.
For example:
SPLookupFieldValue fieldvalue = new SPLookupFieldValue(listitem["lookupwithpicker"].ToString());
string value = fieldvalue.LookupValue;

tonyjun wrote  Aug 20 2008 at 10:56 AM 
Bug Report: Request Field Fail

whtiger wrote  Aug 21 2008 at 7:09 AM 
Hello tonyjun,
Please, give more information

tonyjun wrote  Aug 21 2008 at 7:46 AM 
Hi,I set this "Lookup with Picker" Column,"Require that this column contains information: " to YES.
I add new item, Let this Column blank,.
To submit item, I can't get any error message, the item submit success.

whtiger wrote  Aug 21 2008 at 7:57 AM 
Thank you, tonyjun,
I'll check it and fix in the next release.

whtiger wrote  Aug 22 2008 at 8:00 AM 
Hello tonyjun,
Try 1.1.4

Erawmus wrote  Aug 22 2008 at 7:59 PM 
If I try to upload a document to a document library with a lookup with picker, I get the following error(with the latest version of the software):

Server Error in '/' Application.
--------------------------------------------------------------------------------

Failed to set value of the "look251" column on the "Lookup with Picker" field type control. See details in log. Exception message: Object reference not set to an instance of an object..
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.SharePoint.SPException: Failed to set value of the "look251" column on the "Lookup with Picker" field type control. See details in log. Exception message: Object reference not set to an instance of an object..

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SPException: Failed to set value of the "look251" column on the "Lookup with Picker" field type control. See details in log. Exception message: Object reference not set to an instance of an object..]
Microsoft.SharePoint.WebControls.BaseFieldControl.OnLoad(EventArgs e) +2377
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Creating a document within the library works OK.





--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

aaclage wrote  Aug 22 2008 at 11:46 PM 
Same problem....

Brebinator wrote  Aug 25 2008 at 4:28 AM 
Hey Guys,

I choose the people picker and get this...

Could not load the assembly 'LookupWithPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e1eb4ce568bda77d'. Make sure that it is compiled before accessing the page. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData.

jancis wrote  Aug 25 2008 at 7:34 AM 
Hi whtiger,
Thanks for your great effort.
It seems that the item cannot be searched if it is located inside a folder

allenkwc wrote  Aug 26 2008 at 2:35 AM 
Hi jancis,

In the source code, add a ViewAttributes
oQuery.ViewAttributes = “Scope=\”Recursive\”";

Example Code as following:

C#

using (SPWeb oWebsite = SPContext.Current.Site.AllWebs["Site_Name"])
{
SPList oList = oWebsite.Lists["DocLib_Name"];
SPView oView = oList.Views["View_Name"];

SPQuery oQuery = new SPQuery(oView);
oQuery.ViewAttributes = “Scope=\”Recursive\”";
SPListItemCollection collListItemsAvailable =
oList.GetItems(oQuery);

foreach (SPListItem oListItemAvailable in collListItemsAvailable)
{
Response.Write(SPEncode.HtmlEncode(oListItemAvailable["Name"]) +
“<BR>”);
}

joships wrote  Sep 5 2008 at 11:28 PM 
Thanks for your reply dated Aug 14th. Sorry for late reply.

Could you please tell me if it is possible to bind the data from SQL using your project. I really need something similar to this but only change is I need this from SQL. Please suggest whether this is possible or how complex it is ?

tonyjun wrote  Sep 16 2008 at 9:50 AM 
Could you update function about show many fields in picker dialog?

whtiger wrote  Sep 22 2008 at 2:25 PM 
joships: It's possible, but not in this project. I think I need to start another project, something like 'SQL Lookup'

joyceodom wrote  Sep 23 2008 at 7:06 PM 
is there any chance this could support DataSheetMode for bulk list edits

whtiger wrote  Sep 26 2008 at 11:54 AM 
joships: You can use BDC (business data catalog) to bind the data from SQL.

Kurko wrote  Oct 27 2008 at 5:37 PM 
Hi whtiger,
Great work!
Q:
Is it possible view in popup window another colums from lookups list excepted default(ID, selected column)?

Kurko wrote  Oct 28 2008 at 11:07 AM 
I find solution for my request:
"Lookup Field with Picker V2.56" - part of "iLove SharePoint "
http://cglessner.blogspot.com/2008/08/back-and-forth-lookup-field-with-picker.html
http://www.codeplex.com/iLoveSharePoint/Release/ProjectReleases.aspx?ReleaseId=15633

gch wrote  Dec 1 2008 at 6:02 PM 
Great tool . I was wandering if it possilble to describe, the way that it should be initiated , in order to used it from an ascx control. We are using .net ascx controls hosteb by websmart webparts.

hockeyandgolf wrote  Dec 16 2008 at 8:58 PM 
I have a question about the actual data in the field. What folks are griping about to me is that they have to remember IDs in order to "link" one list to another. I thought this might let users see the title of the field instead of just the ID, but it stores the info as "1;#Firm" for example - and writing CAML, I have to set the value to 'Firm' in order to get the GetListItems() query to work. Is there a way to have this show the title of the field, but actually store just the ID?

TobiasVdb wrote  Dec 19 2008 at 10:10 AM 
Hi, first of all, wonderfull project. Really like how you reply to people making suggestions.
Now, through the comments there was a comment made about cross site lookup. I need the lookup to work on a list in a different sp site.
Is it possible?

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | CodePlex Blog | Version 2008.12.9.14291