regarding [Me] in sharepoint - InfoPath Dev
in

InfoPath Dev

regarding [Me] in sharepoint

Last post 06-08-2007 01:06 PM by jeagly. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-20-2006 03:10 PM

    • Sumeet
    • Not Ranked
    • Joined on 08-25-2005
    • USA
    • Posts 12

    regarding [Me] in sharepoint

    Hello,

    I tried to follow this linkhttp://www.infopathdev.com/howto/tutorials/default.aspx?i=371d344d003946268efdd6b03fcbb6b4 and I just wanted to ask the ID of the users, is it a shareoint thing or is it actually coming from Active Directory. The reason why ask this is because when I try to see the people whose names appear in the drop down list, they are only those who have access to the site and not every user in AD and when I see AD I don't see any ID.

    The reason why I ask this because I am getting the manager name of a particular user from AD and then when the manager logs in I want his to see only those forms that have his name in the manager name field. Since I have to use ID to recognise the manager therefore I wanted to ask whether I can get to the ID from within AD or is it sharepoint specific thing where I have to add the manager as a user first(thus no anonymous access) and only then will I be able to get to the ID field.

    Thanks for your help in advance

    Sumeet
  • 01-22-2006 02:03 PM In reply to

    Re: regarding [Me] in sharepoint

    Hi

    just to sum up if i understood what it is you want:

    You want to retrieve the SPS internal ID of the manager because you want to filter your SPS list by who ever is logged on.

    As the HowTo specifies, the filtering needs to be done on the ID rather than the user name.

    Fetching this info could be done in a number of ways.

    One could be using the GetUserInfo or GetUserCollectionFromSite methods of the "Users and Groups" SPS web service (_vti_bin/UserGroup.asmx) depending on if you need all users or a info about a specific user.

    Jan Tielens made an example of how to populate a dropdown using GetUserCollectionFromSite here:http://weblogs.asp.net/jan/archive/2004/03/16/90533.aspx

    hth
    AndersR


    //AndersR
  • 01-23-2006 01:23 AM In reply to

    Re: regarding [Me] in sharepoint

    Hi Sumeet,
    Yes, our HowTo is specific to SharePoint IDs and not AD. SharePoint uses AD to authenticate users, though.

    Hi Anders,
    Thanks for the link to Jan Tielen's HowTo. That's a great link!



    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 01-24-2006 09:18 AM In reply to

    • Sumeet
    • Not Ranked
    • Joined on 08-25-2005
    • USA
    • Posts 12

    Re: regarding [Me] in sharepoint

    Hello,

    Thank you Anders and thank you Patrick for your reply to both my posts. I really appreciate all your help.

    This is the problem that I am having now. Since everybody in our company should be able to use the infopath form therefore we just add the AD group that contains all the employees. Now since that is done how do I get individual user IDs so that only forms specific to the currently logged in user are shown and not every single form.

    I believe that I will have to write a web-part to show user specific forms in which case I would not even worry about the sharepoint IDs since I'll just go after the data in the AD but in case you have any other ideas then please let me know.

    Thanks for all your help so far,

    Sumeet
  • 01-31-2006 02:07 AM In reply to

    Re: regarding [Me] in sharepoint

    Hi Sumeet,

    are you familliar with Views in SPS?

    the point of the two how-to's are to exhibit the userid so that you can create a custom filter in a view "My Forms" that you choose to filter with the userid that you get from the dropdown matched up on the [Me] token in SPS (be aware that [Me] is called something else if you run a non-english version of SPS -id like to see whoever thought that up's head on a plate btw ;-)

    hth
    //AndersR

    //AndersR
  • 02-02-2006 06:21 PM In reply to

    Re: regarding [Me] in sharepoint

    Thanks AndersR for the insightful response!

    Sumeet, in addition to what Anders said, you may want to switch the InfoPath form to a read-only view for people who don't currently have the form assigned to them. Use a field on the form to capture username and ID (per SharePoint). In the Designer, add a role for Form Editor and Form Viewer. In designer go to Tools->User Roles. For the Form Editor role use an xpath condition where the xpath is the field name you are using to set the username and then make the Form Viewer the default role. Next, add an Open rule to your form (Tools -> Form Options -> Advanced -> Open Rules) and make the rule switch to the full fledged editing view if the current user role is Form Editor. You'll need to have two views before you do this.
  • 06-08-2007 01:06 PM In reply to

    • jeagly
    • Top 500 Contributor
      Male
    • Joined on 06-04-2007
    • Huntsville
    • Posts 37

    Re: regarding [Me] in sharepoint

    Hi, I used this exact method and followed it to a T, but in Preview, I don't get anything in the drop down list box. I need to access the email addresses from a SharePoint site in a drop down list box. I don't know what else to do.

     Thanks!

    Jack Eagly
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.