User with Presence

D

DanHolmes

I'm creating my first InfoPath form. I'm using InfoPath 2003 (with SP1) and
submitting the data to SharePoint 2007.

I've hooked up a DropDownList control to display a List from SharePoint
(using a secondary datasource) and that works fine. I can expose the field to
SharePoint and it will display the chosen value in the FormLibrary. I'm now
trying to do the same thing for a user name. However the People or Groups in
Sharepoint don't appear as a List. I'm guessing I need another secondary
datasource but I don't know how to hook it up to the People in SharePoint.
Also when the chosen value is shown in the FormLibrary, I would like it to
appear 'with presence', i.e. like the built-in column called "Modified By".

Any help would be greatly appreciated! Thanks.
 
C

Clay Fox

Hey Dan.

Are you using an Active Directory web service or a SharePoint web service to
determine the user who opened the form? Or are you trying to have them select
from a SP list?

Once the field is in the form it can be promoted.
There may be some way to get the presence to work on another field besides
the standard ones, but that would probably be a SharePoint question. I often
will put anemail link or link to messenger in the view that they could use to
check manually. Not as good but better than nothing.
 
D

DanHolmes

At the moment I'm using a web service (from SharePoint, I think) to populate
a DropDownList control on the InfoPath form. That means I get a warning
message every time I create/edit a form informing me that data is being
retrieved from a web service, which I'd like to avoid.
There is no default value for the DropDownList because the form doesn't
appear to know who the user is. I tried to use the
UserProfileService.GetUserByName web service method with no parameter to
return a User object representing the current user but that object doesn't
support the UserName or LoginName properties because I'm using InfoPath 2003
not InfoPath 2007.
 
C

Clay Fox

Yah with 2003 you are more limited.
You should check out the Active Directory web service from
http://www.qdabra.com/proddetail.asp?prod=QADWS

This you can ID the user and pull all of their details or anyone else's from
Active Directory. Email, dept, manager, location, phone, etc.

Also group membership which then you can use for conditional formatting so
members can see a section or cannot etc.
 
D

DanHolmes

Thanks for that suggestion but I don't the company will want to buy something
to do this task. I'm currently looking at making the whole thing a List in
SharePoint and authoring custom server web controls to do the complicated
bits. Importing the Microsoft.SharePoint namespace gives my usercontrol
access to the SPContext.Current.User object that represents the current
SharePoint user. It doesn't look as good but it looks like I might get it to
do the required things.

Thanks for your help.
 
C

Clay Fox

True you can get the current user from SharePoint, it is just more difficult
to get the additinal information if that is valuable or how much time you
spend getting at it from some other means.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top