Content Query on an External List

Hello there,
I have created an external list that reads data from a certain SQL table. Now i need to use content Query Web Part to read these data and format them in xslt. Once i have selected the external list using the  Content Query properties i get this error
"External lists are not supported by this Web Part."
How can i make this web part get the data from an external list, or if you could give an alternative i would appreciate it
thanks

Hi,
If you have created External List with External content you can refer these posts
http://www.zimmergren.net/archive/2010/01/19/sp-2010-programmatically-work-with-external-lists-bcs-in-sharepoint-2010.aspx
http://knrs.blogspot.com/2010/03/sharepoint-2010-camlquery-on-external.html
Warm Regards, Bhushan http://www.passionatetechie.blogspot.com

Similar Messages

  • Make Content Query Web Part Resolve list of Resolvable Items before Trimming Item Limit

    I have a problem whereby My Content Query WebPart does not show me the list of items to which I have a permission.
    I am able to see the items from my document library but cannot see them 
    I have identified the problem as being the Item Limit just by removing this setting.
    It seems that the Content Query applies the Item limit settings before trying to resolving the permissions.
    E.g. Say I have 100 items in my document library and do not have permissions on the first 50 items.
     If I set Item limit to 10 in my CQWP, It select the first 10 items of my document library and then resolve permissions on the 10 selected items. This will result in zero items shown in my CQWP as I do not have permission
    to see the first 10 items in the library.
    I would like to be able to tell the CQWP to first resolve the permissions and return the set of items in the document library for which I have permission (in the e.g. the last 50 items), and then select the 10 first items
    and show them in the CQWP.
    How can this be done?
    Thanks and Regards,
    Rhyan.

    I'm not sure you'd be able to make changes to that aspect of the CQWP but the Content By Search Web Part should trim before hand, it's also the 'flavour of the month' for SP2013. Would that be a viable choice?

  • SP2013: create webpart for external list

    Hi there, 
    I have created an external content type and a external list for several entities from an sql server database. What I want to do now is, to develop a webpart / form (most likely in Visual Studio 2012) where I can add functionality to that external list. E.g.
    I want to use an file picker dialog in order to select a document library and store it's ID to a field in the external list. Stuff like that.
    Can anyone give me some points to start from? Actually I have read a lot about the basics of webpart developement, but in that case I'm not sure how to start extending this external list to a GUI with several functions for the users.
    Would be awesome to get some help here,
    kind regards, Jill

    Hello Jill,
    Please check the below post below it addresses the same question
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/06389ca3-9148-4de8-ba08-f275564358f4/external-list-with-custom-forms-neweditdisplay?forum=sharepointdevelopmentprevious
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • Content Query Web Part - Sort Libraries by Name

    Hello,
    I created a Content Query Web Part that lists all Libraries under the current site (preferably it would be better to list only the Libraries on the current site but I couldn't manage to do it). However, the libraries are not sorted in any way.
    The query is the following:
    Path:{Site.URL}* contentclass:STS_List_DocumentLibrary  -Title:Assets  -Title:Templates 
    Whatever I select on the Sorting tab nothing happens, the results are displayed still in the same way, please see attached screenshot.
    PS: I also want to do the same things to lists the subsites - which I also couldn't do to list only one level *Below* the current site - any tips appreciated.
    path:"https://sharepointsite.com/sites/Test/Acquisitions/"  contentclass:STS_Web  Title<>Acquisitions

    Hi,
    Did you use the content search web part?
    I tried to reproduce the issue in my environment, it works well without any issue.
    Did you set the sort by Title in the SORTING section?
    I set the query just like yours:Path:{Site.URL}* contentclass:STS_List_DocumentLibrary  Title:docs  -Title:incoming 
    Then set the sort by Title in the sorting section.
    You can check whether you have configured the SORTING option, then check whether it works.
    Note: By default, the Title property is not enabled the sort option, you can configure it in
    Central Administration->Manage Service Application->Search Service Application->Search Schma
    Thanks & Regards,
    Jason
    Jason Guo
    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

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • How to read the content from a External Content Type with out creating External List in Sharepoint 2013?

    Hi,
    I have a requirement to read the External Content Type and storing the Data in a Session Variable. The Reading of the content from External Content Type with out creating a External List.
    Please help I am trying to find the solution, but unable to do that.
    Thanks,
    Pradeep

    Hi,
    Firstly an external content type designed to work with SharePoint list and there is no way to read apart from this.
    If you are looking the solution out of the " Business Connectivity" then find that data source has been exposed through WCF and  Web Service ?
    So you can use REST API and CSOM to consume those data in SharePoint.
    You can also leverage the ADO.NET option if the datasources based on MS technologies.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • How do I get to display content from an Azure DB , in a SharePoint external list?

    I have an SQL Azure DB, and I am trying to display contents in an external list in SharePoint Online. I have created the external list from the Azure table with BCS and Secure Store as described in the post below...
    http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/make-an-external-list-from-a-sql-azure-table-with-business-connectivity-services-and-secure-store-HA102933008.aspx
    I am now able to view the column headers for the table, however I don't see any data being displayed. There is a bunch of data in the table, but I can't see anything in SharePoint aside from the column headers.

    Hi Spawn,
    Have you successfully retrieved the database table data in SharePoint Designer 2013?
    There may be some incorrect configurations, I would recommend you create a simple DB table and go through the steps again per your referenced link and below article, see if there is any misconfiguration causing this.
    http://jamesdiblasi.wordpress.com/2014/01/19/sharepoint-online-external-azure-database-as-a-list/
    And also we have a dedicated forum below for Office365 SharePoint Online, you can post there for a better assistance with more experts regarding SharePoint Online issue.
    http://community.office365.com/en-us/f/154.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • Issues with Content Query Web Part List Override

    I have modified a Content Query web part to show all checked out documents across my site collection. I used this property to get the checked out documents:
    <property name="QueryOverride" type="string"><![CDATA[<Where><Geq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="int">0</Value></Geq></Where><OrderBy><FieldRef
    Name="CheckoutUser"/></OrderBy>]]></property>
    It fails when trying to view across the site collection and gives this error:
    "There is a problem with the query that this webpart is issuing. Check the configuration of this webpart and try again."
    However, it works for sub-sites.
    Thus, I followed this blog to modify the ListsOverride property: http://geekswithblogs.net/simonh/archive/2013/05/08/increasing-the-number-of-lists-a-content-query-webpart-can.aspx I modified the property to:
    <property name="ListsOverride" type="string"><![CDATA[<Lists Servertemplate="101" MaxListLimit="2000"></Lists>]]></property>
    But now I am getting this response:
    This query has returned no items. To configure the query for this Web Part, open the tool pane.
    Can anyone tell me what the problem is? I cannot find anything in the ULS logs that would indicate a timeout from the SQL server or any other type of error.

    Hi Susan,
    According to your description, my understanding is that there is something wrong when you override content query web part property.
    As you said, the query override works for sub-site, I suggest you check the data in the parent site whether the data is valid.
    Here are some detailed articles for your reference:
    http://rmanimaran.wordpress.com/2010/10/19/getfind-all-checked-out-documents-from-a-document-library-using-caml/
    http://msdn.microsoft.com/en-us/library/office/aa981241(v=office.14).aspx
    Best Regards
    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]
    Zhengyu Guo
    TechNet Community Support

  • Accessing External List that uses BCS with CAML Query

    Hi,
    I have an external list that uses BCS to sql server. I can view the list with  Lists.asmx web service GetLlistItems. However, I get an parameter error when trying to add to the list with UpdateListItems. I will be changing over sharepoint lists to sql
    tables using BCS to connect to them and I need it to be seamless to clients that do CRUD operations using CAML. Are there any instructions on creating such an external list that maintains compatibility with ordinary sharepoint lists?

    CRUD options are fine.
    Here's what I've done.
    Created ECT.
    Created Read list & read item options.
    Set a limit for 200 items (for testing purposes only)
    Created external list based upon ECT created above.
    Opened external list in web browser and I'm able to open, edit & add items without issue.
    What I'd like is to have a simple HTML type form above the list (like in a Content Editor web part with a few text boxes and a 'search' button.  I've tried the link below but it either crashes Sharepoint Designer when I'm defining the parameters or
    if it works there the button doesn't work.
    http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/

  • Color coded calculated list column in content query web part

    I have a calculated column in a list for displayig color coded values using the link
    http://blog.splibrarian.com/2012/06/06/using-calculated-columns-to-add-color-coding-to-your-sharepoint-lists/
    Now for rollup i am using the lists to display them in a content query web part so i have updated the .webpart file and imported and added, made changes in the item style and uploaded ad finally inserted the web part in the page.
    But while diplaying hte custom column, it is being eing displayed as
    string;#<DIV style='font-weight:bold; font-size:24px; color:green;'>•</DIV>
    As you can notice it has appended string;# before the text. How do i avoid this? Thanks

    <xsl:value-of-select="@RAG" disable-output-escaping=“yes”
    />

  • CAML-Query external List

    Hi,
    I am just wondering if there is a limitation on using the <IN>-tag in a CAML-Query on external lists. Whenever I try to use it, I get this error:
    Original error: Microsoft.SharePoint.SPException: Search could not be performed. The underlying CAML query could not be executed. 
    The syntax I am using:
    <In>
        <FieldRef Name='FieldName' />
        <Values>
          <Value Type='Integer'>1</Value>
          <Value Type='Integer'>2</Value>
        </Values>
      </In>
    should be correct, as I am testing this with a caml-builder also. When using IN on a normal sharepoint-list using the same
    syntax and tools I get my desired results.

    Taken out, and still nope. i'm getting no errors it's just showing everything in the list
    Ben
    Private Sub BindPersonCAML()
    Dim siteURL As String = SPContext.Current.Web.Url
    Using oSiteCollection As New SPSite(siteURL)
    Using oWebsite As SPWeb = oSiteCollection.OpenWeb()
    Dim titlesList As SPList = oWebsite.Lists("Holiday_Requests")
    Dim query As New SPQuery()
    query.Query = "<View><Where><And><FieldRef Name='Author' /><Value Type='Integer'><UserID Type='Integer'/></Value></And><FieldRef Name='Cancelled' /><Value Type='Integer'>0</Value></Where></View> "
    ' <Eq><FieldRef Name='Cancelled' /><Value Type='Integer'>0</Value></Eq></Where>
    '<Eq><FieldRef Name='Author' /><Value Type='Integer'><UserID Type='Integer' /><Eq>
    Dim titlesItems As SPListItemCollection = titlesList.GetItems(query)
    ' showing alternative of using data-binding rather iterating through items..
    DropDownList1.DataSource = titlesItems
    DropDownList1.DataTextField = "Title"
    DropDownList1.DataValueField = "ID"
    DropDownList1.DataBind()
    End Using
    End Using
    Ben

  • Js Query External List Web Part

    I am trying to appply a Js Query to higlight those rows in the external List which have the word "pending". I did this by adding the JS Query in the existing web Part which contains the external list.  The below js query does not seem to be
    working. Let me know your thoughts. Thx!
    Below is my js query.
    <script type="text/javascript">
    $(document).ready(function(){
    $Text = $("td .ms-vb2:contains('Pending')");
    $Text.parent().css("background-color", "#461B7E");
    var myelement = $Text.parent().parent();
    $Text = $("td .ms-vb2:contains('Rejected')");
    $Text.parent().css("background-color", "#4CC417");
    $Text = $("td .ms-vb2:contains('In Progress')");
    $Text.parent().css("background-color", "#EAC117");
    </script>

    Hi,
    The External List Web Part is not finish loading even after the page loaded, so we can use setTimeout method to delay executing your code.
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    setTimeout(SetHighLight,1000);
    function SetHighLight() {
    $Text = $("td .ms-vb2:contains('Pending')");
    $Text.parent().css("background-color", "#461B7E");
    $Text = $("td .ms-vb2:contains('Rejected')");
    $Text.parent().css("background-color", "#4CC417");
    $Text = $("td .ms-vb2:contains('In Progress')");
    $Text.parent().css("background-color", "#EAC117");
    </script>
    Best regards
    Dennis Guo
    TechNet Community Support

  • How to hide title of the list on Content Query Web Part?

    I am trying to display the description on content query web part from a list. Even when I leave the Title field blank on "Presentation" section (editing the web part), the title shows up with the link along with the description. Is there any way
    to hide the title or leave it as blank? Any help is highly appreciated.
    Thanks,
    Evilar

    Hi Evilar,
    Thanks for posting your issue, Kindly use the below mentioned CSS Style in ID of table tag to fix this issue
    #hide-title .ms-viewheadertr {
    display: none;
    }OR
    For Content Query Web part (WebPartWPQX) Note; X is a number of your web part.#WebPartWPQX .ms-viewheadertr
      display: none;
      }So only titles of the webpart within the WebPartWPQX will be hided.
    Also, browse below mentioned URL for more details
    http://www.balestra.be/2013/08/hide-column-titles-from-sharepoint-lists-libraries.html
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    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]
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Canon Powershot S2 IS no longer recognized by iPhoto

    I have been unable to get iPhoto to import photos from my Canon S2 IS since the upgrade to 6.0.5. I have tried some suggestions from another thread -- running the 10.4.8 updater again as well as the iPhoto 6.0.5 updater again. Repaired permissions. R

  • Data Quality Services - Summary report

    Hi, Is anyone has a idea about which table is stored summary information comming out from Activity monitor? the example is below: when I exported the data  the summary as follows: My pourpose is to automate this report if it is stored on DQS data bas

  • Where do I find my product serial number?

    Hello,  I ordered the wrong product and need to cancel my order. Adobe is asking for my product serial number but to my knowledge i didnt recieve one with the download.

  • Elements: how to clean older versions in win XP?

    Hey, I've just installed PS Elements 10 as update of version 9 (in turn update of version 8, in turn again as update of version 5). Version 10 works fine but I have a lot of old sw installed and I want to clean up older versions. Moreover i don't fin

  • Can I use my flat panel tv as a monitor for my iMac?

    Is this possible?