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)

Similar Messages

  • Report viewer web part, show different report everyday (rotate .rdl files)

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

  • SharePoint 2010 List View Web Part not showing for read-only users?

    Hello all,
    I have List View Webparts on my Blank Web Part page, and it's not showing for Read-Only users.
    Is this intended by Microsoft or is it a bug?
    Thank you!

    Hi,
    According to your post, my understanding is that the read only user could not see the list view web part.
    Per my knowledge, the issue may be cause that the user do not have the proper permission for the list.
    1. Check whether the user can access the list.
    2. Check whether the user can view all the items instead of partial items in the list.
    3. Check whether there are some fields refer to other lists or terms, especially the lookup field or managed metadata filed.
         If that is the case, make sure the user can access the lookup list.
    Thanks,
    Jason
    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]
    Jason Guo
    TechNet Community Support

  • List View Web part not showing all available views for list

    We have added a list view web part to a page, and we get the "Current View" link in the web part...which is configurable when modifying the actual web part.
    What we'd like to see (instead of having to click the ellipses button/context menu to get the other views) is the views displayed horizontally like when you are viewing the list itself.
    When viewing the list itself, we see "All Items" "View 1" "View 2", etc.
    Is this possible in the list view web part to display all available views in a horizontal/breadcrumb layout?  Please advise.

    The below works via alert, just need to now assign data to a <DIV> or element for display.
    Trying this in simple webpart code snippet to get back all views:
        <script>
        var viewCollection = null;
            function runCode() {
                var clientContext = new SP.ClientContext.get_current();
                if (clientContext != undefined && clientContext != null) {
                    var web = clientContext.get_web();
                    var listCollection = web.get_lists();
                    var list = listCollection.getByTitle("MyListName");
                    this.viewCollection = list.get_views();
                    //var viewInfo = new SP.ViewCreationInformation();
                    //viewInfo.set_title('MyView');
                    //this.viewCollection.add(viewInfo);
                    clientContext.load(this.viewCollection);
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
            function onQuerySucceeded() {
                var viewInfo = 'Tasks list current views: \n\n';
                var viewEnumerator = this.viewCollection.getEnumerator();
                while (viewEnumerator.moveNext()) {
                    var view = viewEnumerator.get_current();
                    viewInfo += view.get_title() + '\n';
                alert(viewInfo);
            function onQueryFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
        </script>
        <a onclick='return runCode();'>Click here</a>
                            

  • 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

  • Custom column in a list view web part for a multilingual site does not take on custom language labels. Stays in default language.

    Hello all,
    I have what so far appears to be a fairly unique problem.  We are running a multilingual SharePoint 2010 environment with English as the default language and French as the secondary.  We have setup the sites in a variance relationship, but the
    issue I am discussing happens outside of a variant as well.
    We have created a library outside the variant (but within the collection) that the two sites must share.  A list view web part was created via Designer to add to each site to provide a quick view into the list.  If we are in the libary and switch
    to French, then update the column label it will remember the setting (because of the resource file) and maintain it as the language is flipped back and forth.  Where it doesn't work is as a web part in a variant or where the language is different.
    If the language is different, the out of the box columns work find, but the custom columns (all site columns not library\list columns) remain as the english label.  It doesn't matter if within a variant or outside with the browser language changed. 
    It always reverts back to English.  It's like it isn't using the same resource file that was used in the list itself.
    I created a custom view and modified it with xslt as per
    http://sharepoint.stackexchange.com/questions/50004/how-to-change-column-title-for-a-view-but-not-modify-the-list but this only worked within the list and did not occur in the list view either.
    I can't be the first that has come across it, either I am not performing my searches properly, no one has ever documented a fix for this or this is something we just can't fix with OOTB tools.  That's the other thing, the solution has to be accomplised
    OOTB or with minor client side changes.  I can't fire up Visual Studio because they are piloting Office 365 and have put a "No custom code" mandate on for migration.
    Thank you all in advance.

    Ok, I have come up with a solution.  I edited the XSLT for the web part on the page.  I did the following:
    1.    Create the variants in the Site Ccollection
    2.    Create the library outside of the variants.
    3.    Add all the columns you require for the library.  It is very important all the columns are there before you move on.
    4.    Create a French and English view.
    5.    Create the list view web part via designer.
    6.    Add the list view web part to each site selecting the appropriate view to use.
    7.      Edit the page in SharePoint Designer 2010.
    8.      Place cursor in the column you wish to modify.
    9.      Click Design in the List View Tools on the ribbon.  
    10.     Then click Customize XSLT and select Customize Item.  Select this option otherwise you will generate a **LOT** of unnecessary XSL code.
    11.     You are looking for a piece that resembles the following:
            <xsl:with-param name="fieldtitle">
              <xsl:value-of select="@DisplayName"/>
            </xsl:with-param>
    12.      Modify it by typing in the actual column name you want.  You should end up with something like this:
            <xsl:with-param name="fieldtitle">
              New Column Name.
            </xsl:with-param>
    13.      Now, for this page only, the column will be renamed.
    There are some caveats:
    1.    Doesn’t appear to work in a publishing portal.  I think this has to do with how SP stores the pages in this case.  In a publishing portal you can only modify the page layout which won’t work as we need to modify the content.
    2.    If you add another column, you will need to repeat the XSLT modification
    Anyways, I hope this helps out any others with the same issue or need as I had.

  • 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

  • Items to display in list view web part not showing the items setup

    Hi, I have the following issue. I have a list view web part, but the web part is showing more items that the ones setup in the: Number of items to display in list view web part for this view.
    It is because that works when using datasheet view and not a normal view? Is there any technical documentation from Microsoft supporting this?

    thank you for your answer. It is interesting that the mobile view with the items to show in the mobile view doesn't work in the webpart, but it works when you are using datasheet view, but if you uncheck to activate the mobile view, then, the webpart doesn't
    show information, so, it works partially because one part works and not the other.

  • SharePoint 2010 list view web part not showing conditional formatting

    when I create conditional formatting in custom list is working fine & when it call through web part page (Data view web part) conditional formatting not showing. data is showing without conditional formatting.
    Dinuka M.

    When you use conditional formatting on some page it is writing inline CSS codes inside that page. thats why when you create a new page and add the same web part to that page, you must edit that page to apply conditional formatting to that
    web part.
    Best Regards, Mustafa Yılmaz MCITP, MCPD | www.mustafa-yilmaz.org | www.sharepointciyiz.biz
    When you say edit the page, do you mean edit it in SharePoint Designer, or in SharePoint itself. And is it a case of just editing, then saving the page and it will apply the conditional formatting, or is there a specific property you need to edit, and if so,
    what is it?

  • Have JQuery for List View web part, But Full Text Not Visible

    I have a list view web part on a page with which, I've edited the view the way I need which includes grouping.
    Inside IE's Developer tools, I can see the structure (TD and then an anchor tag linking to document) and see the class SharePoint uses for that TD. BUT - when I view the source for the page, none of the actual text in the created view shows up at all!
    What I need to do is to wrap the text inside that TD with more html tags, along with adding a left padding. Adding the padding to the CSS file actually works fine.
    The problem is, that when I add the JQuery to wrap everything in the TD the way I need it, since it technically hasn't been rendered yet, even with a document ready function around it, the JQuery never does what it is supposed to do.
    here's the JQuery:
    $('td.ms-vb').each(function() {
    $(this).find( 'a' ).wrap(
    $('<ul style="padding:0px;margin:0px;;">
    <li style="list-style-type:disc;color:white"></li></ul>') );
    I know the JQuery code works because I've tried it on a plain HTML page. The problem is the way the List View web part renders the output. since it's not available on the screen, the JQuery does not work.
    I really need to do this without any programming, since this type of interface appears many times throughout the site.
    Any ideas on how to accomplish this (get the HTML to show in 'view source' so I can apply the JQuery)?

    (bump)
    anyone?

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

  • How to List view web part to display document library for only users with access permission

    Hi
    I am trying to accomplish this requirement but I don't know if that is possible or how to get there.  Any suggestion or advice are helpful.
    On a site collection, I have several document libraries,  with each library have unique permission to a few user or SharePoint group.
    I want to create a web part page and make that the site home page.  On this web part page, I want to create a Content Search Web Part to list the content of the document library that the logged on users have permission to see. 
    Is this possible with CSWP or is there anything easier or if it is not possible at all,  please advise.
    Thanks
    Swanl

    Hi ,
    Based on your description, my understanding is that you want to create a Content Search Web Part to list the documents that the logged on users have access permission.
    It is feasible with CSWP, you can follow the below step:
    Edit Content Search Web Part->Change query-> Select a query: Items matching a content type (System); Restrict by app: Current site collection; Restrict by content type: Document.
    Best Regards,
    Lisa Chen
    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]

  • Issue in treeview control along with page viewer web part showing the sub sites from MMS

    hi,
    Am having a treeview control populates  with values from  MMS - Managed Metadata Service.
    [ Products ]
    ----->ms office 
                ----->word
                ----->excel
                 ---->powerpoint
    -------->Collaboration
                     ---->   sharepoint 2003
                     ---->  moss 2007
                     ----> sp 2010
                     -----> lync
     all these  values excel, word, powerpoint are sub sites created under ms-office site collection.
    and  sharepoint 2003, mos 2007, sp 2010, sp 2013 are  sub sites created under collaboration.
    now, on the page load, end user clicks on word and he should navigate to the  sub site "wordsite"  and it should show the home page of word sub site.
    we have created a  page viewer web part and  assigned the url property of the page viewer to the sub site url.
    but the issue is, when end user clicked  on the child node "powerpoint", the  page did a Post Back and treeview control immediately collpased and it shows the Products [top level - parent node] only.
    Am unable to set the current selected value- ie  here its excel and show the excel node in the trewview.
    how can i get this child tree node as the selected node.
    help is  highly appreciated!

    Check if below can help
    http://thechriskent.com/2012/05/09/changing-the-default-expansion-of-metadata-navigation-on-initial-page-load/

  • Can i use Report viewer web part in SharePoint 2013 app to show SSRS reports?

    Can i use Report viewer web part in SharePoint 2013 app to show SSRS reports?

    SharePoint app you mean a simple sharePoint 2013 application like site, team site etc, or do you mean an App (the new feature like webPart).
    To add a SSRS Report viewver web part follow these steps
    1. Edit the page
    2. Choose insert a webpart
    3.Select SQL server Reporting -> SQL Server Reporting Services Report Viewer webpart
    4. Configure the webpart to show your .rdl files.
    (See the img below. Plz mark as answered if it helps).

  • Using "View Selector" in the List View Web Part, changes the web part page to the view selected's page.

    Hi,
    I am relatively new to Web Parts pages.  I created a page with list view web part and a Infopath Form Web Part, which are connect via the "Get Form From" option.  My users would like to be able to use views dependent on what
    they are looking for.  So I created different views.  However, when I select the view from within the Web Part, it changes the web part page to the list view page.  I must be doing something wrong.  How do I configure the list view to show
    the selected view and results within the existing "list view web part"?
    Thanks,
    Dwayne

    Hi
    Lindali,
    Sorry, but this has not been answered to my liking.  The "List View Web Part" has the ability for the user to select the view from within the web part, so there you should be able to select a different view and have it appear within the same web part. 
    Does anyone know how to complete this task?
    Thanks,
    Dwayen

Maybe you are looking for

  • Homesharing + Apple Remote App on 2 iPads = different display

    Hi everybody, I have the following setup installed at home: An Apple TV 2 + Two iPads. My wife and I are using the devices together, so each of us has their own Apple ID / account ("MyAccount", "WifeAccount") which we are using for our iPads. However

  • Call class inside a jar file??

    Hello group, I have a class with a main mathod and this class is inside a .jar file. This jar file reside under my web-inf\lib or class-path directory in my application at Weblogic Server. How can I call this class by command line? I have to create a

  • Apply profile to AnyConnect Secure Mobility Client 3.1

    G'day Gurus, I have created a profile for Network Access Mnaager using Standalone version of Profile editior. May I know the steps to deploy on end node? Cheers, Ahmed.

  • OBIEE not selecting columns from all LTS of a Conforming Degener@teDimen$ion

    Hello everyone     I have a Degener@teDimen$ion Dimension A it has 4 LTS ( Fact1, Fact1A ,Fact2 and FACT2A).--> FACTS from Physical Layer.. FACTS in BMM are FACT_ONe and FACT_TWO. columns in Degener@teDimen$ion Dimension A col1 --> mapped to all 4 LT

  • SDK Java BO : Schedule and Prompts

    Hi! I am French, excuse me for my English ... I have a problem to indicate when planning my reports, the values of prompts in my reports. Here is my code:                 ISchedulingInfo scheduleInfo = null;                                 IDestinati