Skip to main content
We have an InfoPath 2003 challenge that is really preventing us from moving forward with a lot of the things we want to do in K2.

InfoPath has no “user lookup” control, and it is a huge barrier for us.  I’ve got to assume that this is a problem for others in similar business environments.  The scenario is, we have a form where the user needs to select someone from our address book (AD), then auto-fill that user’s information into certain InfoPath fields.



To try and solve this problem, I have created ‘user lookup’ sections on my IP forms.  These usually consist of a search field, search button, a results drop-down where the actual user can be chosen, and a couple data connections to web services.  This does work, but is not a good solution.  For one, there is a fair amount of development time needed to build this every time (checks for valid search criteria, clearing old results, disabling results drop down if nothing is found, etc.)  Also, since these fields are tied to specific web services, they can only be used once on the form.  If I have 2 areas for picking users, I need to build the whole thing twice.  In the case where there is a repeating “user” node, this will not work at all (I already have two forms in development that have this as a requirement).



In trying to make this better, I built a Winform in C# that can be called as a modal pop-up, and the user lookups are done from there.  This works, but requires a full-trust, and I’ve been having a difficult time understanding what issues that will carry with it.  Also, it is very slow to load the form initially for some reason.


 


How are K2 developers handling this problem?  Is this a reason to not use InfoPath and simply design aspx pages?

There are a few webservices on the internet that can help.  I used to use in demos.  Got it from here


http://www.infopathdev.com/


 If you move to use IP 2007 you can use the AD smartobject and integrate that with the IP form.  I have done that and was able to do it in about 15mins


Hi bluevolume,


We hit this problem too, but we were using MOSS (SharePoint) so we could leverage that for picking users. You can create a smart object that consumes the SharePoint service object for a site instance and retrieve all users that are members of a sharepoint group or site or whatever. Is this something that might be of interest to you?


I would certainly advocate the use of ASPX over Infopath as our customers prefer the slick branded forms and our developers prefer to 'hack' code (as the posibilities are endless!) rather than work with rules (limiting and frustrating!).


Martin


Thank you for the replies, but I don't think I explained my problem well enough.


 I have already written web services that give me full access to our user base.  I can easily add these to my IP forms and have access to the user information I need.


 The problem I have is setting up the fields/controls that let the user pick someone.  The simplest thing would be to just use a drop-down that has all of the users in it, but we have around 3000 users and that's just too many for a single drop-down.  Also, if I add a couple of these, the form starts to get really slow and you get random 'hour glass' pointers when using it.


I need some kind of control that will serve as an address book dialog; something that will let users search for names.  I want this to be something I build one time, and can use it on each new form I make.  I tried the WinForm idea but that seems to complicated with the full-trust requirement it carries.  Maybe I could write an actual control in c#?


In InfoPath 2003 it was possible to use a Javascript in the html pane to connect pop-up HTML dialogs to InfoPath buttons and then store the results in a field.  I used this technique to allow users to query LDAP.  I do not know if this is still possible in InfoPath 2007. This particlular project was not integrated with K2, so there may be some additional tweaks you have to make.


I did a quick search of the internet and found several articles.  Here is one that is similar to the approach I used:


http://blogs.msdn.com/cjwalker/archive/2005/05/19/420254.aspx


 


 


We use also a "customer information" block within our InfoPath Forms. This are fields filled with the information of the form starter like mail adress, phonenumber and additional a user search - same way you describe - using webservice, if it is necessary to change the "default user" for the request.


I create this block as an InfoPath Template and in forms I need it I simple drag&drop the control to the form. So all the rules and dataconnections are ready for use (nothing to do). In addition every customer information block has the save look&feel.


If there are changes to the "user template" you can update your form with a simple control update.


Is this what you are looking for?


Anja


Reply