.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to create a list filter like: get all list elements from the current user and all employees from

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :SharePoint
Hello, is it possible to filter elements by the condition mentioned in the title? Tobias

View Complete Post

More Related Resource Links

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 t

How to pass current user to bdc list to filter data.

Hi all,

I have a bdc list which I want to load on the basis of the currently logged in user. I've tried to use the Current User Filter Web Part provided OOB but it doesn't seem to solve the problem cu'z I can't bind the current user value of the webpart to any column of the bdc list.

The problem is, I want to load the records based on the current user by passing the user name to Stored Procedure. Does any one know how to do that ???? Please F1.



Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

create current user filter in sharepoint designer or wss3

hi, how can i create a current user filter in sharepoint designer?

Create drop-down filter for External List

I hope this is an easy question. I will have an external list of a bunch of people.  There are several ways I want to display this data: All of them, Only the ones that have a value of 1-4 in the status field, Only the ones that have any other value in the status field, and people that have a value of 1-4 in the status field, but are at a certain location. I want to be able to put a drop-down filter above the list where people can select that. Could someone please point me in the right direction? Time is of the essence.  

Create a List on the User's my site

Hi guys, I need to create a list on the user's "my site" portal. How can I do?

Report Parameter type for a list of Employees to prompt like AJAX Textbox intellisence when the user


Hi All,

I have around 300 employees report to run for a specific employee, I cannot have a Dropdown as it would be too long for the report user to choose from. Is it possible in SSRS 2008 to have a text box that would provide intellisence like AJAX textbox and provides user with Employee name to choose from database or is there any other better way to select the right mployee name to run this kind of report. being a newbie to SSRS I am unable to go furthur on this. All help is great help. Thanks in advance for responding.

How to create pre-populated links list that user can personalize

How can I create a pre-populated links list that the user can personalize?

Create list and allow only one item per user


I'm trying to create a list where each user can only create one item, and change the item he has created.

I also need the list to allow each user to view only his own item

When I create a custom list and configure it so that each user can only view and edit his items and after that I try to configure a column validation to allow only different values it gives me an error saying that a list where a user can only see his items cannot have that type of column validation.

I was trying to use this type of validation on a column because I had the column to be auto-filled by the new/edit form (customized via infopath) with the user's username, that way I could ensure that only one item per user would ever exist. However, since I am not allowed to configure the column validation this way, I can't go this route.

Is there a simple way to achieve the effect I am looking for?

search current logged in user's information in sharepoin list


hi guys,

in order to prepopulate some user information, i used query to search the sharepoint list. my question is how to search loggin user's info in the list.

i used following testing query function. it works fine. however, it can only search specific text, cannot be changed according different user.

SPList IsExist;
                    IsExist = SPContext.Current.Web.Lists["somelist"];
                    SPQuery query = new SPQuery();
                    query.Query = @"
                                    <FieldRef Name='First_x0020_Name'/>
                                    <Value Type='Text'>XXX</Value> 
                                    <FieldRef Name='Last_x0020_Name'/>
                                    <Value Type='Text'>XXX</Value> 
                    SPListItemCollection found = IsExist.GetItems(query);

List views - Can I create a filter for tomorrow's items?

I'm setting up some views for a list, and I've already got "John's Tasks for Today" created.  Is there a way to create a view that shows the items that are due tomorrow?  I tried to do this with a filter.  "Show the items when column (Due Date) (is equal to)" and then I typed [Tomorrow] in the field.  I get the error message "Filter value is not in a supported date format."

Is it possible to filter KPI list in order to display only relevant KPIs


I  have created a KPI list and I want to show sections of the list on various parts of my site, however, I dont seem to be able to filter the list. Has anyone tried this and had any success?

Filter web parts in new form page of a list



I've created 2 custom lists. The 2nd list has a lookup column from the 1st list. In the new form page for this 2nd list, I've added the 1st list as a web part. Now, I want to connect the 2 web parts, but it's not available. Basically, what I wanted is that when I select an item on the lookup column, the webpart containing 1st list would show that item on the same page.

I think I'll need to use Sharepoint Designer to implement something like this, but just wanted to check if anyone has done something like this using browser only.



Getting user control in NewForm.aspx of the list


I have designed a user control where i have placed some custom fields as per my requirement now my next step is as soon as user clicks 'Create' under Site Settings it should take him to my user control page instead of Newform.aspx default page of the list.Just let me know your suggestions to achieve this as it would help me a lot

Thanks & Regards,


Can I create several steps to be run on a SharePoint list as a task to run on a daily basis?


We have a manual process that we do on a SharePoint list to export data from SharePoint to a spreadsheet that can then be used by non SharePoint programs.  I'd like to be able to automate this process so that it can be scheduled as a Task to run on a daily basis.   Not sure if a workflow can do what I'd like it to.  I have SharePoint Designer 2007 as well.

Here are the steps:

1. Load a particular View of a SharePoint List

2. From the view's Action menu, "Open with Access"

3. Save the resulting Access database as a file to a specific Folder on the computer hosting SharePoint

This would be run as a Task on the computer hosting SharePoint.

(MVC & jQuery) Can't Add Datepicker to List of form elements



I'm still relatively new to jQuery (mostly finding things I need online and making simple changes). I have the following piece of code in my MVC app to render a partial view

<% int i = 0;
   foreach (var item in Model) { %>

        <td valign="top" style="border: none;">
            <%= Html.TextBox("MeetingList[" + i + "].Start", String.Format("{0:MM/dd/yyyy HH:mm}", item.Start), new { @style = "width: 120px;", @class="start" })%>
        <td valign="top" style="border: none;">
            <%= Html.TextBox("MeetingList[" + i + "].End", String.Format("{0:MM/dd/yyyy HH:mm}", item.End), new { @style = "width: 120px;", @class = "end" })%>

And I've tried the following to grab each of those 'MeetingList[...' items and add a datepicker to them,

        $(".start").each(function(index) {
            var $temp = $('#MeetingList[' + index + '].Start');
}); });


Quick Note: Create Custom List Definitions in SharePoint 2010

In this exercise, you create a custom list definition in Microsoft SharePoint 2010 and then create an event receiver that is triggered when the list is used.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend