How can I filter a Sharepoint 2007 libarry list based on current user login?

Hi all.
I would like to know how I can filter a SharePoint library list based on current user login.
Suppose I have created the followings:
1) A SharePoint form library containing bunch of uploaded InfoPath form data.
2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value
to that of "TargetUser".
I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.
I have googled this subject for hours but I have not found any solution.
It would be greatly appreciated if anyone can help me to create a functional filtered list.
FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
Thank you.
Jason

Here's what I usually do in order to accomplish this.  Ultimately you'll need to have 2 different fields.  There's the one you already have, with DOMAIN\username stored in it.  Then you'll need an additional field as a "person" column type. 
Call it "TargetPerson" or something.
Create a sharepoint designer workflow that runs each time an item is created or changed.  One action:
Set FIELD to VALUE.
The first FIELD is "TargetPerson", the VALUE is your "TargetUser" field. 
Once this is done, then the person value is stored in the person field.  This is the field that you can filter by "TargetPerson" is equal to [Me]
Laura Rogers, MCSE, MCTS
SharePoint911: SharePoint Consulting
Blog: http://www.sharepoint911.com/blogs/laura
Twitter: WonderLaura

Similar Messages

  • Sharepoint programmaticaly add list item under current user - 0x80070005 (E_ACCESSDENIED))

    Please help me.
    In our company, we developed an application under the Apple device to work with the company's internal services , including it in this application it is possible to send messages to the corporate blog portal, which is deployed on Sharepoint 2013 .
    The application architecture is as follows:
    Server on which you installed Sharepoint 2013 is called "SPS01", on the same server is deployed on IIS web application called "WS",
    application "WS" taken in a separate application pool from Sharepoint 2013 .
    All Apple client devices communicate with Sharepoint 2013 through the web application "WS". For us it is important that when applying for Sharepoint 2013 with mobile
    devices, Apple remained the security context of the authenticated user, as access to documents stored in Sharepoint 2013 demarcated .
    For what would be maintained security context authenticated users , we applied techniques such as impersonation and kerberos .
    Request goes like this:
    Apple client connects to the Web application "WS", on the "WS" configured
    to connect to Kerberos enabled and impersonation . (Apple iOS 7 support kerberos ) , then all customer interaction with Sharepoint 2013 going through "WS". Kerberos
    we use that to get rid of the problem of "double hopes" that occur when a web application "WS"
    refers to the other network resources that are beyond the server "SPS01".
    Example:
    Web application "WS", which is on the server "SPS01", refers to a
    file server «FS01», to get a list of documents from the usual file balls through kerberos and impersonation request comes on «FS01»
    from the user who is authenticated by web application «WS».
    But there was a problem:
    If the user enters the Sharepoint 2013 through the browser on your computer, it can successfully keep there blog post .
    If the user is drawn to Sharepoint 2013 from a mobile device Apple, and tries to leave a message in the blog , the error appears : Access Denied. Exception: Access is denied.
    (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Empirically by the following was revealed: I tried to give you a right to - it did not help:
    Administrator farm
    SQL database config and content - owner
    Administrator of User Profile Services
    Local Administrator
    BUT!
    When deploying Sharepoint 2013 group was created security domain - "domain \ farm_administrators" - which is in the local group Sharepoint 2013 - "Farm
    Administrators" If the user is included in the domain security group - "domain \ farm_administrators", then the user can successfully keep a blog
    post from a mobile device Apple.
    I want to note that this happens only through security group AD «domain \ farm_administrators»
    The question is, how can you determine what rights the special security group "domain \ farm_administrators" in Sharepoint 2013 , whereby the participants can successfully
    send messages to the blog with Apple mobile devices via the web application "WS".
    We also found a workaround , but it will not work as we would like.
    RunWithElevatedPrivileges
    http://msdn.microsoft.com/en-us/library/bb466220.aspx
    We can execute a part of the Web application "WS" with the highest privileges. In this case, the user was able to successfully send a message to your blog from your
    mobile device Apple.
    But when the code runs with the highest privileges - lost the security context of the authenticated user.
    In the author is shown as "System Account"
    public static XmlDocument addBlogMessage(string projectID, string text)
    XmlDocument response = new XmlDocument();
    string result = string.Empty;
    string webUrl = SPUrlUtility.CombineUrl(Constants.SITE_URL, projectID);
    using (SPSite site = new SPSite(webUrl))
    using (SPWeb web = site.OpenWeb())
    SPList blogMessagesList = web.GetList(SPUrlUtility.CombineUrl(webUrl, Constants.BLOG_MESSAGES_LIST_URL));
    SPListItem newBlogMessage = SPUtility.CreateNewDiscussion(blogMessagesList, "Сообщение");
    newBlogMessage[SPBuiltInFieldId.Body] = text;
    web.AllowUnsafeUpdates = true;
    newBlogMessage.Update();
    web.AllowUnsafeUpdates = false;
    result = "<response><userResult><code>Success</code><messageID>" + newBlogMessage["ID"].ToString() + "</messageID></userResult></response>";
    response.Load(new System.IO.StringReader(result));
    return response;

    Yes I make sure that the assigned field is filled as the workflow will not work unless that field is filled with a valid username.
    I am an administrator on this SharePoint site  and I am using several people to email to that are not admins on the same site.
    The issue seems to lie in the Workflow itself.  In the one step that I have "Send an email" you fill out what should go in the To: field in the email.  That is where it should say "Current Item:Assigned To" according to all the documentation I
    have read and what mine will only enter in the To: field is "Assigned To" only it is missing the key first part of where to look.  Even though when I go through the steps I have indicated that it the data should be found in the Current Item from
    the field of Assigned To and to return the information of email address, which is well with in the realm of this Action in Workflow. 
    I have been able to accomplish this in another workflow that is not meant to be Reusable and is tied to one list only.  This seems to only be an issue when trying to do this in the Reusable Workflow creation and execution and when I use the Association
    Columns.
    Any further ideas or suggestions?  Any would be appreciated.
    Regards,
    Lara K.

  • How can I generate portal report that give list of iviews-roles-users

    Hello,
    I need to generate a portal report that will list all roles and iviews that assigned to them.
    iviews can be assigned direclty or trough worksets/folders/pages.
    Is there a way I can create such a list? Is it requires development? If so, Is anybody already deveopled such a report and can share the code?
    Thanks
    Ami

    Hi Ami,
    I cannot assure that this can be achived with portal application. Coz we are trying to get iviews n role info assigned to users. i.e. Portal object info.which is not stored in d server as it appears to end users. it will be stored as PCD ID based., not name based.
    The requirement might need to develop Portal Applicaion at SAP NWDS but, i am not sure of displaying iviews. Also we can get the Role IDs of assigned role but not Role.
    http://help.sap.com/javadocs/NW04S/current/se/com/sap/security/api/UMFactory.html
    Please follow UME API to achive this.
    IUserFactory userfactory =  UMFactory.getUserFactory();
    IRoleFactory rolefactory = UMFactory.getRoleFactory();
    IRoleSearchFilter rolefltr = rolefactory.getRoleSearchFilter();
    rolefltr.setMaxSearchResultSize(2000);
    ISearchResult result = rolefactory.searchRoles(rolefltr);
    while (result.hasNext())
      String uniqueid = (String) result.next();
      IRole role = rolefactory.getRole(uniqueid);
    The same thing can be applied to get users info i.e. Portal users list.
    Hope this helps you.
    Good Luck!
    Regards,
    Shaila

  • Set "peoples or groups" field with current user "login name" in sharepoint list form using javascript

    hi friends
    i am trying to set peoples or groups field in sharepoint  list form with current user login name
    here my code
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    $(document).ready(function NewItemView () {
    var currentUser;
        if (SP.ClientContext != null) {
          SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
        else {
          SP.SOD.executeFunc('sp.js', null, getCurrentUser);
        function getCurrentUser() {
          var context = new SP.ClientContext.get_current();
          var web = context.get_web();
          currentUser = web.get_currentUser();
          context.load(currentUser);
          context.executeQueryAsync(onSuccessMethod, onRequestFail);
        function onSuccessMethod(sender, args) {
          var account = currentUser.get_loginName();
          var accountEmail = currentUser.get_email();
          var currentUserAccount = account.substring(account.indexOf("|") + 1);
        SetAndResolvePeoplePicker("requester",account);
    // This function runs if the executeQueryAsync call fails.
        function onRequestFail(sender, args) {
          alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     function SetAndResolvePeoplePicker(fieldName, userAccountName) {
       var controlName = fieldName;
        var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
        var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
        var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
        peoplePickerEditor.val(userAccountName);
        spPeoplePicker.AddUnresolvedUserFromEditor(true);
    </script>
    but it is not working
    please help me

    Hi,
    According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
    To set "peoples or groups" field with current user "login name”,  you can use the below code:
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    function SetPickerValue(pickerid, key, dispval) {
    var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
    xml = xml + PreparePickerEntityXml(key, dispval);
    xml = xml + '</Entities>';
    EntityEditorCallback(xml, pickerid, true);
    function PreparePickerEntityXml(key, dispval) {
    return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
    function GetCurrentUserAndInsertIntoUserField() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
    Function.createDelegate(this, this.onFailure));
    function onSuccess(sender, args) {
    SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
    this._currentUser.get_title());
    function onFaiure(sender, args) {
    alert(args.get_message() + ' ' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
    </script>
    More information:
    http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can I filter a table from Data Control without enter query

    I have a table from a web service data control based on WSDL.
    I want to filter the table without input query at filter text box. Without filter text box, each would filter the table with a hardcoded query internally.
    For example, when user click A menu button then it filters the table where type = '1' and B menu button filters the table by type='2' and C menu button filters the table by type=' ' .
    How can I filter the table without enter query?
    Could anyone point me to a solution please.
    Thanks.
    jdev 11.1.5
    Edited by: 893364 on Oct 26, 2011 12:15 PM
    Edited by: 893364 on Oct 26, 2011 12:21 PM

    Hi,
    when you created the table, did you try selecting the "filter" option. Select the table and go to the Property Inspctor. In the tool bar of the Property Inspector there is an icon to change the configuration. Its adding filter filter fields for the user to search in.
    Option 2: The data of the Web Service actually is held in the iterators. If you wanted to filter the WebService query, I would not use the WS DC but a JAX-WS proxy in a POJO to fetch the WS Data. Then have the Data Control created from the POJO. You could have a method exposed on the POJO that allows you to filter the internally held data
    Frank

  • How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

  • How can I filter facebook widget feeds ?

    hello everybody
    I've started using social widget on my nokia C7, it's really nice. I want to set the widget to render updates from specific network / friend list  as I am a member in a lot of pages and have more than 400 friend. So whenever I connect to the internet I get flooded by a lot of unimportant updates and the important ones are lost in this crowd
    may someone tell me how can I filter updates ?
    Thanks

    Hi flegno,
    Depending on which version that Firefox is on, currently in the Simulator is looks like there is only a way to pin the apps that result in a searched category. Searching for people in contacts who have a particular app installed does not seem to be an option? However I cannot know for sure.
    Can you give another example on what you are looking for everything.me to do?

  • How can I filter or block foreign language emails or email addresses

    How can I filter or block foreign language emails or email addresses??
    TIA
    C

    Most email clients have a provision to create a 'rule'. The rule examines the email as it is received. In generally you can search for specifically senders, recipients,subjects, or specific content words in the body. Based upon the findings of the rule, you can do something with the email (such as end it directly to the Trash).
    For example if you know where all of valid you emails come from, you can create a rule that checks the from field for an acceptable sender and sends those email's that to the inbox, while sending all emails from other senders to the trash or spam folder
    Keeping out foreign language emails is often difficult because because often it is difficult to come up with a rule that will catch them on the basis of language they are written in.
    There are also commercial products that can scan incoming email and 'score' the email based upon content, and you decide at what 'score'  you want the mail sent straight to the trash or spam folder. Verizon's spam filter does this based upon Verizon's scoring system, and actually does catch a lot of spam. It also occaisonally catches things that are not spam however....
    Hope that is helpful

  • How can I filter alerts shown in the Server app?

    In the time I've been running OS X Mavericks Server, the only alert to come up in the Server app's Alerts pane is "Virus detected in inbound email". That's about as surprising as finding that water is wet, so I'd like not to see those alerts. I don't want to turn off the email filtering, I just want don't want to hear about this one kind of event.
    How can I filter the alerts in general or this one in particular?

    Hi ephraimephraim
    I dont know if you found a solutions, but I hit the same problem so here is what I worked out...
    Go to: Mac HD/Library/Server/Mail/Config/amavisd
    In there you will find a file called amavisd.conf
    Make a backup copy of this just incase! Now open the file using TextWrangler (its free from here http://www.barebones.com/products/textwrangler/download.html).
    Now scroll down to line 119 and it will look like this:
    #$virus_admin              = "[email protected]";  # notifications recip.
    #$spam_admin               = '[email protected]';
    #$spam_quarantine_to       = '[email protected]';
    #$banned_quarantine_to      = '[email protected]';
    #$virus_quarantine_to      = '[email protected]';
    What I waneted to do was stop the useless "Virus detected in inbound email" emails and just send a copy of the emails to one account that I could keep an eye on, so this is what I did.
    First deside on a alias to use, such as [email protected],
    Now you can insert that like this virus-admin\@$mydomain its relly is important to add the \@$mydomain this resolves up the top of the file so it should now look like this
    #$virus_admin              = "virus-admin\@$mydomain";  # notifications recip.
    #$spam_admin               = 'virus-admin\@$mydomain';
    #$spam_quarantine_to       = 'virus-admin\@$mydomain';
    #$banned_quarantine_to      = 'virus-admin\@$mydomain';
    #$virus_quarantine_to      = 'virus-admin\@$mydomain';
    now delete the # notifications recip. after the virus_admin to stop the Virus Notifications, then I deleted the # before the spam_quarantine_to, banned_quarantine_to, virus_quarantine_to  this "turns on" the line and then add # notifications recip. after them, so you should end up with
    #$virus_admin              = "virus-admin\@$mydomain";
    #$spam_admin               = "virus-admin\@$mydomain";
    $spam_quarantine_to       = "virus-admin\@$mydomain";  # notifications recip.
    $banned_quarantine_to      = "virus-admin\@$mydomain";  # notifications recip.
    $virus_quarantine_to      = "virus-admin\@$mydomain";  # notifications recip.
    Now just create a user on the server called virus-admin of add it as an alias using Workgroup Manger.
    Hope this helps

  • HT204380 How can I filter my 500+ email contacts to just those I can facetime chat with?

    How can I filter my 500+ email contacts to just those I can facetime chat with?

    You will need to remove it as your rescue email : log into your account via the 'manage your apple id' button on http://appleid.apple.com, select the 'Password And Security' section on your account's screen, and answer the two security questions that show - you should then be taken to another screen where you can change or remove your rescue email address.
    Then try logging out of your account and then log back in and see if you can then use it as your primary email address.

  • How can I filter thermocouple noise using a TC-2095 and SCXI-1102c?

    Hello all,
    I currently have four TC-2095s connected to SCXI-1102c cards inside a SCXI-1001 chassis. These thermocouples are floating and I have been getting a fair amount of noise (3-phase 400 Hz and even 60 Hz noise) when we power on some equipment such as blowers and fans. Using this current set up, how can I filter the noise? Or do would I need to set up a new hardware configuration (i.e. SCXI-1102 cards)?
    Solved!
    Go to Solution.

    Hi RALoo, 
    The 1102C has a lowpass filter with a cutoff at 10kHz, so you will not be able to filter in hardware with your current setup.  
    Your first option would be to use a software filter.  LabVIEW has several functions which accomplish this. More information on this can be found here: http://zone.ni.com/reference/en-XX/help/371361J-01/lvanls/filter_vis/
    The second option would be to change to SCXI 1102 cards as you suggested.  The lowpass filter of the 1102 has a selectable cutoff frequency at 2 Hz, which will stop the 400 and 60Hz noise from affecting your readings.
    Patrick W.
    Applications Engineer
    National Instruments

  • How can i filter just te equipment with date to 31129999 ??

    Hi ,
    How can i filter just te equipment with dateto 31129999 ??  i need just the valid equipment with dateto 31129999 but this char i cant take it to filter, how can i do this?

    In the Update tab of the InfoPackage, you can select the Time-Dependent data. In this, if you only want to extract Equipment Master Data Attributes or Master Data Text for effectivity dates of current date through 31-Dec-9999, you can create a routine for the time interval by updating it as such:
      CONSTANTS: c_max_date TYPE d VALUE '99991231'.
      p_datefrom = sy-datum. "Current Date
      p_dateto   = c_max_date. "Max Date

  • How can I filter based on the IPTC core information?

    How can I filter based on the IPTC core information? (CS6)

    "Substitution Variables" can do what you are asking for.

  • How can i filter at the app store for an itouch 1st gen v 3.1.3 ?

    how can i filter at the app store for an itouch 1st gen v 3.1.3 ?

    vitofromoak park wrote:
    how can i filter at the app store for an itouch 1st gen v 3.1.3 ?
    Sorry, but I don't believe there is way that you can.  You'll just have to make sure to read the minmium requirements of any App you are about to purchase to ensure that it is compatible and will run on your iPod Touch running iOS v3.1.3.
    B-rock

  • I got bulks of videos in my ipad 2, how can i look at my videos in list display? or make the fonts in my movie gallery smaller?

    I got bulks of videos in my ipad 2, how can i look at my videos in list display? It's hard for me to look through my gallery with grid display..
    any ideas?

    There is no list display option. If there were such an option, it would likely be available within the Videos app.

Maybe you are looking for