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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

Fetching Task List for the logged in User with LINQ/CAML/SQL query

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :SharePoint
 

Hi All,

We have some workflows which are been created already. The tasks are been assigned to users for their approval. Now, when the approver logs in it should display the Tasks List which are belonging to that particular user only. OR if the normal user logs inn, it should display Tasks belonging to that User only. A web part should display this. Pls. note that I have to show the Tasks from both "Workflow Task" & "Task".

The Task list should come from across site collections of a Web Application.

Hence,The Scopen should be WebApplication.
How do I achieve the same? Need help ASAP.

Thnx,

Alex


alex


View Complete Post


More Related Resource Links

Fetching Task List for the logged in User with LINQ/CAML/SQL query

  

Hi All,

We have some workflows which are been created already. The tasks are been assigned to users for their approval. Now, when the approver logs in it should display the Tasks List which are belonging to that particular user only. OR if the normal user logs inn, it should display Tasks belonging to that User only. A web part should display this. Pls. note that I have to show the Tasks from both "Workflow Task" & "Task".

The Task list should come from across site collections of a Web Application.

Hence,The Scopen should be WebApplication.
How do I achieve the same? Need help ASAP.

Thnx,

Alex


alex

Task List for the logged in User with LINQ/CAML/SQL query

  

Hi All,

We have some workflows which are been created already. The tasks are been assigned to users for their approval. Now, when the approver logs in it should display the Tasks List which are belonging to that particular user only. OR if the normal user logs inn, it should display Tasks belonging to that User only. A web part should display this. Pls. note that I have to show the Tasks from both "Workflow Task" & "Task".

The Task list should come from across site collections of a Web Application.

Hence,The Scopen should be WebApplication.
How do I achieve the same? Need help ASAP.

Thnx,

Alex


alex

Fetching Task List for the logged in User

  

Hi All,

The requirement is as follows..

We have some workflows which are been created already. The tasks are been assigned to users for their approval. Now, when the approver logs in it should display the Tasks List which are belonging to that particular user only. OR if the normal user logs inn, it should display Tasks belonging to that User only. A web part should display this. Pls. note that I have to show the Tasks from both "Workflow Task" & "Task".

How do I achieve the same?

Thnx,

Alex


alex

Fetching the Currently Logged in user Email

  

Hey Frnds,

I am using the System.DirectoryServices.UserPrincipal.Current.EmailAddress to fetch the Currently logged in users email from AD.

If  debug my sol am getting the Exact mail id of that Particular user for ex:john@in.domain.com.

If i host My Application on iis

And Access my App am getting some other Email id instead of the john@in.domain.com.

I have changed the Application Pool identity to NetWorkService.

Can any one tell what could be wrong

Thanks

Regards

N.Balaji


Query an arraylist of array list using linq

  

I have an array list called Customer. I t holds a list of array list which has the account details.

proj.customer -> collection of arraylist of type customer

proj.customer.account -> collection of arraylist of type account


Account array list holds type account and it has a poperty account balance. How can I query all accounts which has account balance  >100


I tried the following one

var Accountlist= from Account accountdetails in proj.customer.account

where accountid.balance >100

select accountdetails.id

But it is always throwing an error saying cannot cast type customer to type account

Please help


How to join two sharepoint list in c# by CAML query?

  
Hii All,
 
   I am using wss 3.0 and i have one site and site has 4 to 5 lists. lists are interconnected with lookup column and same column. I need to display some column fron one list and some from another.. i need to join that lists by where condition like project =project..

So how can i join??



Thank You
Dips
Patel

Linq query results to List collection

  

Hello

I have a GridView in my page. I want to use below code in code beind. query nothwing DB using linq . add linq query result to new list and then bind list as gridview Datasource

I use below code . But I don't know how to add results to List? Could any one tell me how !


Public Class OrderCity
        Private _name As String
        Private _city As String
        Public Property name As String
            Get
                Return _name
            End Get
            Set(ByVal value As String)
                _name = value

            End Set
        End Property
        Public Property city As String
            Get
                Return _city
            End Get
            Set(ByVal value As String)
                _city = value

            End Set
        End Property
    End Class
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim dbe As New SFFAV1DataContext
        Dim latestadsDs = From p In dbe.Products _
                            Select New With {p.Title, p.ProducedCity} _
                             Take (2)

        Dim FilteredList As New List(Of OrderCity)()
        For Each result In latestadsDs
            Dim Menedfcou = Nothing
            FilteredList.Insert(0, Menedfcou)
        Next
     
         GridView1.Da

Insert a "Select User" row in Linq for a dropdown list

  
I'm new to Linq. I have searched and searched the web for a soluion, and can't find anything. I have a Linq query and I want to insert a row ("Select User") to the top before I pass it to the drop down list. I've been trying to use the Union but to now avail (it keeps telling me that my object doesn't support the Union method). My code, prior to attempting to inser a row, is very simple.public SelectList DropDown_Users()        {            var context = new VivarianDataContext();            var query = from t in context.AspnetUsers                        select new { t.UserId, t.LastName };            list = new SelectList(query.AsEnumerable(), "UserId", "LastName");            return list;        }Now I try to insert a row and I found this on the internet and it seems to say that his solution will work. But it is filled with syntax errors. http://magicode.wordpress.com/2009/08/20/inserting-an-item-in-iqueryable-object-using-union-met

CAML query on external list is not working

  
Hi, I have an external list, display data from SQLServer 2008. Table on SQL have an UniqueIdentifire (GUID) type column as a Primary key. It also has one identifier column, Its value is increased by 1, as the item is created. In share point server side code, I want to fetch single record against the primary key GUID value. I write down the CAML query on GUID column and run without any error. But all the external list data is returned instead of Single list item. I also try to filter on Auto Incremented column, but same problem is occurred.

Is there a way to assign a "USER FRIENDLY" name to an "ASSIGNED TO" TASK List?

  
I'm starting to develop simple TASK lists, to assign tasks to a team.  Unfortunately, I'm finding that the ASSIGNED TO field wants to populate user names with a NETWORK-Style name (i.e.,  mycompany.com\jsmith  ), instead of a preferred user name (i.e., John Smith).  The descriptive user name DOES show up for a few users, but not most. I figure that there must be something buried in some user roles/permissions, at some level - but I am still having problems with navigating around the Sharepoint neighborhood to find the options that I want (if they exist). I'd very much appreciate assistance with something that could, I hope, be rather simple. Thanks,

CAML query to access List data across multiple site collection.

  
Hi   Is there any way to get the Task List data across multiple site collection using CAML query. Currently, I have the code which will retrieve the data from a single site collection. Below is the code.                           /***************************************************I am using Moss2007.Thanks!Ravi             SPSiteDataQuery q = new SPSiteDataQuery();             q.ViewFields = "<FieldRef Name=\"Title\" />" "<FieldRef Name=\"Status\" Nullable=\"TRUE\"/>";             q.Lists = "<Lists ServerTemplate=\"107\"/>";             q.Webs = "<Webs Scope=\"SiteCollection\"/>";             q.Query = "<Where>" +                                "<Eq>" +                                     "<FieldRef Name=\"Status\" />" + "<Value Type=\"Choice\">Not  Started</Value>" +                                     "</Eq>" +                         "</Where>";             DataTable dt=null;             using (SPSite s = new SPSite("http://banglabguest1:31000/"))             {                 SPWeb w = s.OpenWeb();                 dt = w.GetSiteData(q);                 w = null;             }                              *************************

LinQ query for My task

  

hi all,

I have to filter the MyTask according to "Assigned To" = "SharePoint Group" and "TaskStatus" = "InProgress", I have created the SPLinq.cs file using the SPMetal.exe for the particular webapplication but I am not able to get the "TaskStatus" field in the linq MyTask Object, also have checked the SPLinq.cs file it's having the definition of "Assigned To" and "TaskStatus".

Please Help me how to do filter the MyTask according to "Assigned To" = "SharePoint Group" and "status" = "InProgress" by using Linq.

Regards,

Arun Kumar


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 = @"
                        <Where>
                            <And>
                                <Eq> 
                                    <FieldRef Name='First_x0020_Name'/>
                                    <Value Type='Text'>XXX</Value> 
                                </Eq>
                                <Eq> 
                                    <FieldRef Name='Last_x0020_Name'/>
                                    <Value Type='Text'>XXX</Value> 
                                </Eq>
                            </And>
                        </Where>";
                    SPListItemCollection found = IsExist.GetItems(query);
                    

CAML Query for ListItemCollection within a Folder ListItem in a List (Not "SPList")

  

Hey all,

 

I'm in the process of creating a Silverlight Application that needs to pull data from a SharePoint list.  Unfortunately, some of the data is within sub-folders, and calling the List.GetItems(CamlQuery) function is only returning the root level (no sub-folder content).

 

I noticed from searching around for the solution to this that an attribute exists for doing a recursive check, so all the list items could be returned, but all the times this solution is mentioned is in regards to getting an SPList and using an SPQuery. The SPQuery variable has a ViewAttributes property to do this, apparently, but I don't seem to have that specific of a choice with the CamlQuery variable type here.

 

Any help?


Can I elect which list appears when a user clicks "complete task" in a sharepoint workflow?

  

Hi,

I have a "Collect data from user" task which naturally shows the Workflow Tasks list when the user clicks "Complete Task" and the task form closes.  This is a little confusing for the user who thinks they are working on items in the base list.  Is there a way I can choose which list is shown after the user clicks "Complete Task" (or any action which closes a workflow task)?

I am using SharePoint 2007 Standard Edition and SPD 2007

Many thanks for your help,

Kirsten


CAML query to check if user is member of a specific group

  

I've got a nested query caml which basically should check 3 things:

  1. Check if a task has been assigned directly to the ucrrent user
  2. Check if a task has been assigned to a group the user is in
  3. Check if the user is member of a specific

The first to bullet points work like a charm, but I can't figure out how to get the last one to work. Here is what I thought should work:

query += "<Where>";
query += "<Eq><Membership Type=\"CurrentUserGroups\">";
query += "<Value Type=\"String\">Name of my specific group</Value>";
query += "</Membership></Eq>";
query += "</Where>";

Somehow it doesn't seem to be the correct approach, is there somebody who can help me out on this? Thanks


Selecting a Task List in Sharepoint Designer 2007 while setting up "Collect Data from User"

  
When using Sharepoint Designer 2007 to Collect Data from User the task list cannot be selected.  Instead the Task list that is defaulted is the most recently created Task List.  How can I select a specific Task list to associate with"Collect Data from User"?
Categories: 
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