Query SharePoint List View

As per http://msdn.microsoft.com/en-us/library/ms434064.aspx if we use
list.GetItems(query, view.ID.ToString("B").ToUpper());
properties of the view that is specified by the viewName parameter override the properties that are specified in the query object that is passed through the query parameter. For example, if the query
object includes a tag that specifies only items containing a particular column value, while the view specifies to return all items, this method retrieves all of the items
So is there any way to query a sharepoint list view (not All Items) using CAML query?
I this retrieving view in a data table and query it later, which is an option but might give a performance degradation.
Regards, Aj (http://www.aj-sharepoint.blogspot.com/) MCTS

Hello,
Did you try with SPView.Query method? If not then this can be query to specific view.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spview.query.aspx
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • Calculated fields in Sharepoint list view

    Hi,
    I have to add a calculated field with formula as
    if the difference between 2 date fields is 0 then i have to add todays date-modifed date.
    how to achieve this in sharepoint list view/column ?
    Aruna

    Hi Aruna,
    SharePoint doesn't allow you to use the[Today] function
    in a calculated column, but there are other work around for this.Please find below link for this.
    http://abstractspaces.wordpress.com/2008/05/19/use-today-and-me-in-calculated-column/
    Regards
    Soni K

  • Export to Excel is not working for List View Web Part after filtering using Query String parameters in SharePoint 2010

    Hi, 
    I am filtering SharePoint list view web part based on Query string parameter and I am doing Export to Excel by using following code.
    <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=0DC67399-BE11-48F3-ADFC-E911FB8B5845&View=54671412-3EFE-4281-835A-9EF747AE774E&CacheControl=1'"><img
    alt="Excel" src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;Export to Excel</a>
    Issue: Able to do Export to Excel when there are no filters applied on list view web part but if applied filters on web part and do export to excel , only header fields are displaying in the excel sheet.
    I don't know why owssvr.dll is behaving like that .
    Please share your ideas.
    Thanks in Advance.

    Hi,
    According to your post, my understanding is that you wanted to create hyperlink to export to excel.
    The URL to execute the export is as follows:
    {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1
    After getting the GUID, you  need to “decode” the list GUID.
    Replace %7B with {
    Replace %2D with –
    Replace %7D with }
    More information:
    Create Link to Export Library Contents to Excel
    SharePoint - Create a link to export to Excel
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to filter a sharepoint list with report parameters

    Hello there,
    I'm trying to make a sql report on a sharepoint library. I have no problems to connect to the library but i cannot find a way to filter my data source with report parameters. I've searched on the net a lot, found some stuffs about xml but nothing that shows
    how to do it with sharepoint. Any help would be greatly appreciated!
    Thanks in advance!

    Hi mgarant,
    As you mentioned, by default, we can use xml parameter "query" to filter a SharePoint list from SQL Server Reporting Services. We can also modify the value for the "query" to use SQL Server Reporting Serivces parameters to filter the SharePoint list.
    Below are the detailed steps for your reference:
     1.Change the query string to be a string like this:
    <Query>
    <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
    <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
    <Parameters>
    <Parameter Name="listName">
    <DefaultValue>{ADBE55DB-63A1-4C14-9DA0-B1B05C13B4C8}</DefaultValue>
    </Parameter>
    <Parameter Name="query" Type="xml">
    </Parameter>
    </Parameters>
    </Method>
    <ElementPath IgnoreNamespaces="true">*</ElementPath>
    </Query>
     2.In the dataset modification dialog, go to "Parameters" tab.
     3.Create a Report Parameter(e.g. CityParam).
     4.In parameter tab, create a parameter with:
    Name: query
    Value: ="<Query>
       <Where>
          <Eq>
             <FieldRef Name='WorkCity' />
             <Value Type='Text'>" & Parameters!CityParam.Value & "</Value>
          </Eq>
       </Where>
    </Query>"
    Please note, “case sensitive” is required. In this case, the parameter name for "query" must be in lower case. WorkCity is name of a field in the SharePoint list.
    For more information about how to retrieve value from SharePoint list, I would suggest you reading the following article and threads:
    http://vspug.com/dwise/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux/
    http://blogs.msdn.com/mariae/archive/2007/12/13/querying-sharepoint-list-from-reporting-services-returns-only-not-null-columns.aspx
    I also implemented a sample, you could download it from:
    http://cid-3c7e963ff6ccd974.office.live.com/browse.aspx/.Public/SharePoint%20List%20sample?uc=2
    Please feel free to ask, if you have any more questions.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • Powershell script with list view

    Hi,
    I have a scheduled job in SharePoint 2013 environment, where I export SharePoint list Items as csv. I would like to use a SharePoint list View so that I get all the items from the view into csv. I tried below
    script and it only returns items that are in the first paginated view. The view has an item limit of 50 items. But I wan't to return all the items in the view. 
    Please help me modify the script accordingly. Thank you.
    #Retrieving the Web Site with List
    $MyWeb = Get-SPWeb "http://mysite/sites/testsite"
    #Get the List name
    $MyList = $MyWeb.Lists["Programs"]
    #Get The View
    #Change the name of the view
    $MyView = $MyList.Views["My View"]
    #Get the Items from the view
    $MyItems = $MyList.GetItems($MyView)
    #Get Specific field items and export it to a csv file
    $MyItems | %{ select-object -input $_ -prop @{Name='ID';expression={$_.ID;}}, 
    @{Name='Content Type';expression={$_["P. Type"];}}, 
    @{Name='Program Name';expression={$_["Program Name"];}},
    @{Name='Classifications';expression={($_["Classifications"]).substring(($_
    ["Classifications"]).IndexOf("#")+1);}},
    @{Name='Classifications ID';expression={($_["Classifications"]).split(";")[0];}},
    @{Name='VP';expression={($_["VP Owner"]).substring(($_["VP Owner"]).IndexOf("#")+1);}},
    @{Name='VP ID';expression={($_["VP Owner"]).split(";")[0];}},
    @{Name='Project Manager';expression={$_["Project Manager"];}},
    @{Name='GL Project Code';expression={$_["GL Project Code"];}}, 
    @{Name='Segment BU';expression={($_["Segment BU"]).substring(($_["Segment BU"]).IndexOf
    ("#")+1);}}, 
    @{Name='Segment BU ID';expression={($_["Segment BU"]).split(";")[0];}},
    @{Name='C-Product Line';expression={$_["C-Product Line"];}}, 
    @{Name='Node and Foundry';expression={($_["Node and Foundry"]).substring(($_["Node and 
    Foundry"]).IndexOf("#")+1);}},
    @{Name='Node and Foundry ID';expression={($_["Node and Foundry"]).split(";")[0];}},
    @{Name='Phase';expression={$_["Phase"];}}, 
    @{Name='Program Activity';expression={$_["Program Activity"];}}, 
    @{Name='Archive';expression={$_["Archive"];}}; } | Export-Csv -Path "c:\Dashboard.csv"
    techie

    Hi CoolTechie,
    Rather than writing a batch job to populate excel timely fashion, I will suggest to make a excel data source auto-refresh after every minute, which is more real time. That excel can be shared as well.
    You can use the Excel as external data source, you
    can set refresh the excel per 1 minute.
    The steps of configuration, you can refer to the following
    link.
    http://sharepointlink.blogspot.com/2010/08/sharepoint-2010-excel-services-and.html
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • SharePoint 2013 List View with query string filter stops working after editing view from browser

    I have created one list definition in which I have added one list view which will filter data from query string paramater
    So when I am creating list from my list definition, view with query string filter is working fine.
    But when I am modifying view from UI(I am not changing any thing , just opening "Modify View" page and then click on "Save" button), view gets stop working means it's not filtering data based on query string
    Any suggestion what I am missing?
    Below is my list view schema
    <View BaseViewID="11" Type="HTML" TabularView="FALSE" WebPartZoneID="Main" DisplayName="$Resources:OIPLBScoreCard,viewFilterTasksByTarget;" MobileView="True" MobileDefaultView="False" Url="FilteredTasks.aspx" SetupPath="pages\viewpage.aspx" DefaultView="FALSE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
    <Toolbar Type="Standard" />
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    <ParameterBinding Name="TargetId" Location="QueryString(TargetId)" />
    </ParameterBindings>
    <JSLink>hierarchytaskslist.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <JSLink>clienttemplates.js</JSLink>
    <RowLimit Paged="TRUE">100</RowLimit>
    <ViewFields>
    <FieldRef Name="Body"></FieldRef>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="StartDate"></FieldRef>
    <FieldRef Name="DueDate"></FieldRef>
    </ViewFields>
    <ViewData>
    <FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete"></FieldRef>
    <FieldRef Name="DueDate" Type="TimelineDueDate"></FieldRef>
    </ViewData>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="oipscTargetLookup" LookupId="TRUE"/>
    <Value Type="Lookup">{TargetId}</Value>
    </Eq>
    </Where>
    </Query>
    </View>
    I have one lookup field from "Target List" in my source list and I want to filter data based on that lookup field.

    Hi JayJT,
    The Miscellaneous is located in the contact list that you used for the connection.
    So , you need to edit the page, then edit the contact list that you used, in the web part properties of the contact list, you will find Miscellaneous, then expand it and select ‘Server Render’ .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Reading items from a list view in SharePoint 2013

    I am trying to read items from a Calendar, and have created a view that contains all the items/events that I would like to retrieve to package in a CSV file, specifically the Title, Description, and the Start and End Dates.
    The problem with some events is that they are recurring, and rather than use CAML to expand the events and try to query it that way, I thought it would be more elegant to just get the events from the view, and package them with a simpler query.
    The problem I am running in to is that I can reference the entire list and package the data, or I can reference the list and get all the data in a specific date range, which does not include the recurring events, but I cannot simply read the data from the
    view.
    Any pointers would be greatly appreciated. Also, can you recommend any complete-ish texts on PowerShell with SharePoint?

    Hi,
    Based on my understanding, as there is no straight way of using CAML to query all the events(specially for instances of recurring events) by a list view, I would suggest
    you separately query the instances of recurring events needed.
    A code demo(though in C#) about
    how to query events(include recurring events) from Calendar list in this thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/99c3ded6-a8cb-4509-9a74-e93e445d78c7/how-does-calender-list-daterangesoverlap-todaymonthyear-and-week-exactly-work?forum=sharepointdevelopmentprevious
    About
    how to export to CSV file:
    http://www.codeproject.com/Articles/667269/Export-To-CSV-file
    http://www.codeproject.com/Articles/685310/Simple-and-fast-CSV-library-in-Csharp
    How to export to CSV file using PowerShell:
    http://shaiknb.wordpress.com/2013/05/27/powershell-sharepoint-export-list-items-via-view-to-csv/
    http://meandmysharepoint.blogspot.com/2012/08/export-sharepoint-list-data-into-csv.html
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • Build XML for Custom Nested Accordian (like Tree View Structure) for SharePoint List Data

    Expected output in Xml:
    <?xml version="1.0" encoding="utf-8" ?>
    - <TopRoot>
    - <Root id="1" Name="Department">
    - <Type id="2" Name="IT">
    - <SubType id="3" Name="Technology">
      <SubSubType id="4" Name="Sharepoint" />
      <SubSubType id="5" Name="ASP.NET" />
      <SubSubType id="6" Name="HTML 5" />
      </SubType>
      </Type>
    </Root>
    </TopRoot>
    List Details:
    list details for storing category / sub category data and code to build tree structure for the same.
    1.Create Custom List named “CategoryDetails”:
    2.Create Column “Category Name” of type single line of text. Make it as required field and check Yes for Enforce Unique values.
    3.Create column “Parent Category” of type lookup. under Additional Column Settings.
    Get information dropdown, select “CategoryDetails”.
    4.Choice column ["SRTypeName"] 1.Root,2.SRTYPE,3.SubSRTYPE, 4.SUBSUBSRTYPE
    In this column dropdown, select “Category Name”:  
    Referance:
    http://www.codeproject.com/Tips/627580/Build-Tree-View-Structure-for-SharePoint-List-Data    -fine but don't want tree view just generate xml string
    i just follwed above link it work perferfectly fine for building tree view but i don't want server control.
    Expected Result:
    My ultimate goal is to generate xml string like above format without building tree view.
    I want to generate xml using web service and using xml i could convert into nested Tree View Accordian in html.
    I developed some code but its not working to generate xml /string.
    My modified Code:
    public const string DYNAMIC_CAML_QUERY =
            "<Where><IsNull><FieldRef Name='{0}' /></IsNull></Where>";
            public const string DYNAMIC_CAML_QUERY_GET_CHILD_NODE =
            "<Where><Eq><FieldRef Name='{0}' /><Value Type='LookupMulti'>{1}</Value></Eq></Where>";
            protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
                 string TreeViewStr= BuildTree();
                 Literal1.Text = TreeViewStr;
            StringBuilder sbRoot= new StringBuilder();
            protected string BuildTree()
                SPList TasksList;
                SPQuery objSPQuery;
                StringBuilder Query = new StringBuilder();
                SPListItemCollection objItems;
                string DisplayColumn = string.Empty;
                string Title = string.Empty;
                string[] valueArray = null;
                try
                    using (SPSite site = new SPSite(SPContext.Current.Web.Url))
                        using (SPWeb web = site.OpenWeb())
                            TasksList = SPContext.Current.Web.Lists["Service"];
                            if (TasksList != null)
                                objSPQuery = new SPQuery();
                                Query.Append(String.Format(DYNAMIC_CAML_QUERY, "Parent_x0020_Service_x0020_Id"));
                                objSPQuery.Query = Query.ToString();
                                objItems = TasksList.GetItems(objSPQuery);
                                if (objItems != null && objItems.Count > 0)
                                    foreach (SPListItem objItem in objItems)
                                        DisplayColumn = Convert.ToString(objItem["Title"]);
                                        Title = Convert.ToString(objItem["Title"]);
                                        int rootId=objItem["ID"].ToString();
                                        sbRoot.Append("<Root id="+rootId+"
    Name="+Title+">");
                                        string SRAndSUBSRTpe = CreateTree(Title, valueArray,
    null, DisplayColumn, objItem["ID"].ToString());
                                        sbRoot.Append(SRAndSUBSRTpe);
                                        SRType.Clear();//make SRType Empty
                                        strhtml.Clear();
                                    SRType.Append("</Root>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
             StringBuilder strhtml = new StringBuilder();
            private string CreateTree(string RootNode, string[] valueArray,
          List<SPListItem> objNodeCollection, string DisplayValue, string KeyValue)
                try
                    strhtml.Appends(GetSRType(KeyValue, valueArray, objNodeCollection);
                catch (Exception ex)
                    throw ex;
                return strhtml;
            StringBuilder SRType = new StringBuilder();
            private string GetSRType(string RootNode,
            string[] valueArray, List<SPListItem> objListItemColn)
                SPQuery objSPQuery;
                SPListItemCollection objItems = null;
                List<SPListItem> objNodeListItems = new List<SPListItem>();
                objSPQuery = new SPQuery();
                string objNodeTitle = string.Empty;
                string objLookupColumn = string.Empty;
                StringBuilder Query = new StringBuilder();
                SPList objTaskList;
                SPField spField;
                string objKeyColumn;
                string SrTypeCategory;
                try
                    objTaskList = SPContext.Current.Web.Lists["Service"];
                    objLookupColumn = "Parent_x0020_Service_x0020_Id";//objTreeViewControlField.ParentLookup;
                    Query.Append(String.Format
                    (DYNAMIC_CAML_QUERY_GET_CHILD_NODE, objLookupColumn, RootNode));
                    objSPQuery.Query = Query.ToString();
                    objItems = objTaskList.GetItems(objSPQuery);
                    foreach (SPListItem objItem in objItems)
                        objNodeListItems.Add(objItem);
                    if (objNodeListItems != null && objNodeListItems.Count > 0)
                        foreach (SPListItem objItem in objNodeListItems)
                            RootNode = Convert.ToString(objItem["Title"]);
                            objKeyColumn = Convert.ToString(objItem["ID"]);
                            objNodeTitle = Convert.ToString(objItem["Title"]);
                            SrTypeCategory= Convert.ToString(objItem["SRTypeName"]);
                           if(SrTypeCategory =="SRtYpe")
                              SRType.Append("<Type  id="+objKeyColumn+" Name="+RootNode+ ">");
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SRSubTYpe")
                              SRType.Append("<SRSubType  id="+objKeyColumn+" Name="+RootNode+
    ">");  
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SubSubTYpe")
                              SRType.Append("<SubSubType  id="+objKeyColumn+" Name="+RootNode +"
    ></SubSubType");  
                        SRType.Append("</SubType>");
                        SRType.Append("</Type>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
                // Call method again (recursion) to get the child items

    Hi,
    According to your post, my understanding is that you want to custom action for context menu in "Site Content and Structure" in SharePoint 2010.
    In "SiteManager.aspx", SharePoint use MenuItemTemplate class which represent a control that creates an item in a drop-down menu.
    For example, to create or delete the ECB menu for a list item in
    "Site Content and Structure", we can follow the steps below:
    To add the “My Like” menu, we can add the code below:      
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemLike"
    runat="server"
    Text="My Like"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickNavigateUrl="https://www.google.com.hk/"
    />
    To remove the “Delete” menu, we can comment the code below:
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemDelete"
    runat="server"
    Text="<%$Resources:cms,SmtDelete%>"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickScript="%SmtObjectDeleteScript%"
    />            
    The result is as below:
    More information:
    MenuItemTemplate Class (Microsoft.SharePoint.WebControls)
    MenuItemTemplate.ClientOnClickScript property (Microsoft.SharePoint.WebControls)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is there a way to exclude temporary people picker fields from a query when receiving the "List View Lookup Threshold" error.

    Hi All,
    My users require the ability to select a sharepoint group from a drop down list and then be able to select a user from a people picker based on the drop down selection.    The best solution I was able to up with, was create a people picker
    for each drop down selection and set the Sharepoint group field to the selected group.  All people picker filed are hidden except the one that matches the drop down selection.  When creating an entry from the sharepoint list this method
    works perfectly.
    However, when I add the list onto a site page using an "Listview webpart", then add an infopath web part and then finally connect the two parts, I get a "List View Lookup Threshold" error when selecting an entry from the list.  I
    understand from the error and reading that this error is related to the number of People pickers in the list.   Is there a way to exclude temporary people picker fields from a site page query, as they are only temporary fields to allow the users
    to select a person and then assign the name to another field.
    Dwayne

    Hi Dwayne,
    In SharePoint 2013, we could manually create a list for all users. Here are the reference:
    Go to Site Settings >  People and Groups > SiteMembers
    Modify url
    http://sitename/_layouts/15/people.aspx?MembershipGroupId=8 to
    http://sp/sites/tutu/_layouts/15/people.aspx?MembershipGroupId=0 , now you will see All people in this site.
    Change the view to List view, and copy the listview id in the url
    http://sitename/_layouts/15/people.aspx?MembershipGroupId=0&View={viewID}
    Go to Settings > List settings, copy the list id in the url
    http://sitename/_layouts/15/listedit.aspx?List=listeid&Source=....
    Now type the address in IE:
    http://sitename/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[LISTID]&View=[VIEWID]&CacheControl , such as
    http://sp/sites/tutu/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=f3958d27-9c2f-4f8d-b221-89466e816667&View=696BFDC5-0C6E-4E27-818F-0E6292A18407&CacheControl=1
    Save the owssvr.jqy from SharePoint site
    Now you could see the file in your desktop with all users, save it as allusers in Excel.
    Then import it to your SharePoint site, add an app > find an app > import spreadsheet
    Regards,
    Rebecca Tu
    TechNet Community Support

  • External List: List View Web Part query never returns

    I am experiencing an usual issue in our development SharePoint 2013 environment. I have been troubleshooting it for a couple hours, so thought it is time to post a message here.
    I have created a number of external content types and lists on our site. I have validated that the lists display the expected data.
    However, when I add a page to our site, and add a list view web part to the page, and point the list view web part at the external list, I get unexpected behavior.  While I am editing the page, the web part displays the expected data. However, after
    I publish the page, when you browse to the page, all you get is the rotating green arrow gif image, and no data. It displays the image forever. If you then attempt to edit the page, in the editor, you can then see the expected data.
    Any thoughts on what might be causing this issue? I have tried switching out web parts, both to the Business Data List and the Content Query web part. The Content Query web part throws an exception if you attempt to point it at any of the external lists,
    which after some reading I discovered that this is a known issue with that web part.
    The Business Data list web part shows the expected data, but I have been unable to get paging/grouping working with that web part yet.
    Greg Pierson

    I have recreated this issue on a clean site collection. I have also discovered this issue only occurs with publishing pages, not site pages. next step is to try to reproduce it on another share point 2013 install.
    Greg Pierson

  • Add custom column in default list view in sharepoint

    Hello,
    How to add custom column in default list view in SharePoint 2013? In list view we have view fields section. But its not allowing to add any static text.  I want to add one button/textin view fields. How to add that?
    <View Name="{C7499466-A865-4742-8511-5536D2521D1C}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="All Documents" Url="/SectionManagement/SitePages/Untitled_1.aspx" Level="1"
    BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=23" ><Query/>
    <ViewFields>
    <FieldRef Name="LinkFilename"/>
    <FieldRef Name="LinkFilenameNoMenu"/>
    </ViewFields>

    Hi,
    to add a field to a view use this
    <ViewFields>
    <FieldRef Name="LinkFilename"/>
    <FieldRef Name="LinkFilenameNoMenu"/>
    <FieldRef Name=[InternalNameOfCustomField]/>
    </ViewFields>

  • Different query for same view showing on different page as list view web part

    Hi all,
    If you have three pages and want to add Documents library as list view web part to these three pages with different query (Programmatically), Do you need to create three different views for Documents library or it is possible to have different query when
    I add the list view web part to the page?
    thanks and appreciate all kind of advice.

    When you add a List View Web Part to a page, SharePoint actually copies the selected view query into the Web Part itself. For example:
    You create a custom view on a list called "Mede71's View" and you configure it only show the Title column
    You add a List View Web Part to a page and update the settings to use the "Mede71's View"
    You go back to your list and change "Mede71's View" and add the "Modified Date" column
    Your List View Web Part will not reflect this change because in step 2 the Query from the view was copied into the List View Web Part
    When you programmatically add the List View Web Part, you can either assign it to an existing view or supply the query directly. If you want to instruct users to be able to add their own web parts pointing to those views in the future, I would recommend
    creating the views first.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • CAML Query to Sort SharePoint list items based on Modified date

    hi ,
    can we sort sharePoint list items based on 'Modified' column, the sorting should be done up to milliseconds level.
    currently i am using CAML query as below
    <OrderBy><FieldRef Name='Modified' Type='DateTime' IncludeTimeValue='TRUE' Ascending='False'/></OrderBy>but its not considering milliseconds while sorting.
    Thanks and Regards,
    venkatesh.

    Veda, thanks but I'm not really a hardcore C# coder.
    We found more elegant solution was to create a List View which returns all records that should be deleted, based on our own custom deletion criteria, and then create an very simple SSIS Package in Visual Studio using the
    Sharepoint Connectors for SSIS to delete all Sharepoint List Items returned from that List View. The Sharepoint Destination Connector has a delete operation.
    This worked for us and didn't require any coding.

  • List view web part not reflecting changes made to list view in SharePoint Designer

    Dear All,
    When adding a list view web part containing a view modified in SharePoint designer (e.g. conditional formatting applied, or group headers modified) I'm finding that the changes made in SPD are not reflected in the web part. 
    For example, I go into SPD edit a view, and the view appears correctly when I go back into SharePoint, however when I link to the view within a list view web part it results in losing the changes made in SPD. 
    Becasue it's a publishing page I'm unable to edit the contents of the web part in SPD.
    I'm sure this is expected behavior but how do I get around this?
    Thnaks,
    MDB

    Try below
    http://stackoverflow.com/questions/19533998/sharepoint-designer-doesnt-show-anything-in-list-and-libraries-link
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/a63a1894-6b1d-420a-95dd-b6c546eab34d/updates-made-to-sharepoint-designer-2010-workflow-do-not-show-up-on-the-server?forum=sharepointcustomizationprevious
    http://stackoverflow.com/questions/5959521/sharepoint-designer-saves-the-changes-but-it-does-not-affect
    http://social.technet.microsoft.com/Forums/en-US/1e9a8c27-bbc5-4a6f-8daf-4b243182f543/changes-in-sharepoint-designer-2010-not-showing-in-sharepoint-server-2010-page?forum=sharepointadminprevious

  • How do I use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?

    We are attempting to use SharePoint 2010 in combination with Exchange 2010 to implement shared calendars and contact lists throughout our organization.  We are able to connect the lists to Outlook 2010, but have been unsuccessful in viewing
    the calendars and contact lists from our mobile phones.  How do we use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?
    In trying to answer this question, we have come across a few different possibilities, all of them falling just short of a long term solution for us.  After doing research, we found that Active Sync will only show the default folders of the account.  To
    solve this, we downloaded an Add-In for Outlook (CodeTwo FolderSync) to synchronize folders and synchronized our SharePoint list with a new Contact list in the default folder.  The issue we came across with this method is that the Add-In we are using
    is not capable of automatic synchronization.  There is a button and it must be clicked after every update is made, which is not ideal for our solution.  We then went to the company (CodeTwo) and found server side software (Exchange Sync) that they
    offer which will automatically synchronize the folders.  After installing that on the Exchange Server, we now are running into the issue of not being able to locate the SharePoint lists on the Exchange Server.
    Does anyone happen to know how we can get to the SharePoint lists from the Exchange Server?  Has anyone else been able to use shared contacts lists and calendars from SharePoint on their mobile phones using Active Sync?  If so, are we in the right
    direction with what we have found so far?
    Thanks,
    Brad

    You cannot use ActiveSync for that, but there are SharePoint clients for the iPhone. Windows Mobile 7 natively supports SharePoint with SharePoint Workspace Mobile, part of Microsoft Office Mobile. Android and BlackBerry might also have some apps.
    Use Microsoft SharePoint Workspace Mobile
    http://www.microsoft.com/windowsphone/en-us/howto/wp7/office/use-office-sharepoint-workspace-mobile.aspx
    iPhone SharePoint Apps Shootout
    http://www.codeproject.com/KB/iPhone/iPhoneSharePointApps.aspx 
    Comparing SharePoint iPhone Apps
    http://blog.praecipio.com/2010/11/02/comparing-sharepoint-iphone-apps/
    MCTS: Messaging | MCSE: S+M

Maybe you are looking for

  • IPod Classic 5th generation will not sync with new MacBook

    I have had a 5th generation iPod classic that I have been super happy with.  I have used it with several PC laptops.  Because I have gone through so many PC's, I decdied this year to get a new MacBook Pro.  Since my old PC was dying it took forever t

  • How to enforce order of execution of parallel tasks?

    How do I set the order of execution of parallel tasks in a container? The execution isn't truly random. It appears to be set to a random constant at package creation. Demo I set up a dummy package. Max concurrent executions = 1 sequence container wit

  • Mail Notification after changing the status

    Dear All, We had configured the Service Desk in Solution Manager.But the requirement is when we change the status of the request (Suppose from New to In Process or from In process to Proposed Solution, there has to Mail Notification which is sent to

  • Problems with IMAC after using ccleaner app

    I downloaded the free cccleaner app and used it to "clean" my imac.  Now I can't access .doc or .xls files on my mac (.docx and .xlsx files are fine) and the auto-save in WORD doesn't work.  I can't even open .doc WORD files that I receive in an emai

  • PS and FM code in sap

    Hi all, Do anyone of you know what is the code of Fund Management and Project System? Best regards, Lucas