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

Similar Messages

  • How can I use today's date as default value in query string filter web part in SharePoint

    I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...

    Hi,
    Per my understanding, you might want to set a default value to the Query String Filter Web Part.
    It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
    By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
    of browser.
    If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
    URL into the address bar:
    http://sharepoint/SitePages/Page1.aspx?t=value1
    Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
    page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
    About how to redirect user to other page with an URL:
    http://www.tizag.com/javascriptT/javascriptredirect.php
    How to get today’s date using JavaScript:
    http://www.w3schools.com/js/js_dates.asp
    Best regards      
    Patrick Liang
    TechNet Community Support

  • Business Data List Web Part

    Hi all,
    I am using the Business Data List Web Part to show and search data from external database as following link
    http://msdn.microsoft.com/en-us/library/office/ms493107(v=office.12).aspx
    But the Business Data List Web Part doesn't allow me to choose one or multiple items as other SP lists. I mean it doesn't have the CheckBox column. How could I have it?
    Thanks

    Hi,
    According to your description, Business Data List Web Part which data from external database doesn't have the check box column.
    I have done a test in my SharePoint 2013, and I met the same issue with you. Although I defined the edit action for the external content types, I still couldn’t edit a record from business data list web part.
    I would suggest you to use External List. In this case you will be able to Add/Edit/View item if your External Content Type has all operations.
    Here is a blog about how to Create an External List, you can use as a reference:
    http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2013/01/07/how-to-create-external-list-including-database-from-sharepoint-designer-2013.aspx
    beside, here is a similar post, you can use as a reference:
    https://social.technet.microsoft.com/forums/sharepoint/en-US/1a958e61-2c73-472c-83c7-443466aefcf8/edit-item-in-business-datra-list-webpart
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • Views for list web parts. Is there a way to allow users to change the view for a list web part without being redirected?

    Hi,
    I added a list view web part into a SharePoint 2013 page and it  is working as expected, except for one thing.
    I have enabled the option for the user to change the view for the web part. However when the user changes it, the user is redirected away from the page containing the web part, to the URL of the list itself.
    Is there a way to circumvent this issue so when the user selects a different view it updates the listing in the web part itself, rather than the user being redirected?
    Thanks in advance for the help.
    Regards,
    P.

    Hi,
    Please understand that one page can only display one view. You could find it out by observing the Address in browser when switching among different views for a list.
    If you would like to change the view of a list web part, you could go to web part propertites > Select view and configure it.
    In addition, here is a thread with similar requirement that might help:
    http://social.technet.microsoft.com/Forums/en-US/18dba190-5ee2-4b50-b005-1360d862f4ba/how-can-end-user-change-the-view-in-a-list-view-web-part?forum=sharepointgeneralprevious
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to limit the number of items in a KPI Status list web part?

    How to limit the number of items in a KPI Status list web part? There is no paging option for Business Category Status list or any limit can be made by changing the Item limit in default view unlike other SharePoint List web parts. So How to achieve it?
    Kindly help.
    Regards,
    ZA
    zzzSharePoint

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Cannot get URL web part filter to pass Parameter to List web part

    How do I wire an out-of-the-box URL web part filter to a SharePoint 2013 list (or "app" as renamed in 2013) web part when the list has a parameter?
    My SharePoint list uses a parameter because it needs a Contains filter, as in
         <Where>
          <Contains>
           <FieldRef Name="MyFieldName"/>
           <Value Type="Note">{MyParam}</Value>
          </Contains>
         </Where>
    The ParameterBinding is defined simply.
    <ParameterBinding Name="CohortParam" DefaultValue=""/>
    It has had Location="None" in the past, but another forum entry that I read suggested removing that.
    When I add the list (or "app" in SharePoint 2013) to a web part page and also add a URL Filter web part, the URL filter cannot see the parameter. The menu chain Connection >> Send Filter Values To >> [My List web part name] shows
    the dialogue. On the "Choose Connection" tab, I choose "Get Parameter Values From". Clicking the "Configure" button results in the "Configure Connection" tab having the message "The Consumer Web Part did not
    provide schema information".

    Hi Randy,
    You need to change the "MyParam" to "CohortParam", for parameterbinding element we need to add the location attribute as below codeline, then when we use the QueryString "CohortParam" with value in url, it will directly
    filter the list web part items without adding URL Filter web part.
    <ParameterBinding Name="CohortParam" Location="QueryString(CohortParam)" DefaultValue=""/>
    I attached my resutls as below image (also "MyParam" can be changed to "CohortParam" if you want), you can take a look.
    Thanks,
    Daniel Yang
    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]
    Daniel Yang
    TechNet Community Support

  • Cacade Sharepoint List Web Part

    hi,
    I created a custom view and insert 2 SP List Filter to filter the list content.
    The 2 SP List Filters are related, for example:
    Filter #1 - list of companies.
    Filter #2 - list of employees.
    I would like the Filter #2 to display only the list of employees for the selected company in Filter #2.
    How to accomplish this?
    Thank you.

    Hi Chuaky,
    Based on your description, I  understand what you want is that when you click a column in the list of companies, the list of employees display the 
    Corresponding items.
    You can implement your requirement  as the following:
    1.Create a companies list and create a column named company.
    2.Create a employees list and it also contains a column named company.
    3.Add the two lists into one page.
    4.On the page, click page ribbon --click edit , at companies list web part, choose edit web part--Connection--Send Row of Data to-- choose 
    employees--choose Get filter Values from--choose "Provider Field Name: company (from companies list), Consumer Field Name: company (from employee list)"--finish.
    5.The companies list web part will automatically add  a column named Select, click select, now what you want is finished.
    Besides the above, There are is a link which you can use as a reference:
    http://blogs.technet.com/b/rajbugga/archive/2013/04/25/creating-connected-web-parts-in-sharepoint.aspx
    Best  regards,
    Wendy Li
    TechNet Community Support

  • Status List Web Part corrupting other Web Parts!!

    Hello,
    I am using the Project Site Template and have observed a very strange behavior when I add a Status List (with status indicators) to the overall "Home" page: It seems to be corrupting other web parts located on the same page. I.e. the
    timeline is suddenly displayed twice and the newsfeed has no entries anymore.
    Has anyone got experience with this?? I couldn't find anything similar here!
    Kind regards..  

    Hi,
    According to your description, my understanding is that the status list web parts in your page only load completely for the first one.
    I made a test in my SharePoint 2013 environment, and the status list web part can all load properly in the page.
    Did your environment install the latest CU updates ?
    I suggest you can install the latest CU updates and test if it works.
    SharePoint CU download link:
    http://blogs.technet.com/b/steve_chen/archive/2013/03/26/3561010.aspx
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • Status list web part indicators keeps on loading

    Hi,
    When I am using more than 1 status list web part on a page, only the first one loads completly.
    Rest are in loading status.
    Please assist.

    Hi,
    According to your description, my understanding is that the status list web parts in your page only load completely for the first one.
    I made a test in my SharePoint 2013 environment, and the status list web part can all load properly in the page.
    Did your environment install the latest CU updates ?
    I suggest you can install the latest CU updates and test if it works.
    SharePoint CU download link:
    http://blogs.technet.com/b/steve_chen/archive/2013/03/26/3561010.aspx
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • List web part column alignment: how to change?

    I have a wide list web part but all the three columns are aligned to left. So there is a huge white area on the right. Was it like this also in 2010? Can I change it so that the columns would be spread also to right?

    Try these steps:
    Open the page containing the list web part in Edit mode
    Open the web part's settings panel
    Set the web part's width as desired

  • List web part -show search box (disappears)

    hello everyone, 
    I used list web part in my page and checked the show search box. but, when i save the page and publish, this search box disappears. 

    Hi Sultannur,
    Please check if it could help with switching to "Summary Toolbar" in web part property, or patch the latest cumulative update for SharePoint 2013 and check result again.
    http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/fb263f21-b733-4d3b-a872-08aae8a65763/
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Debugging XSLT of Business Data List web part in SPD 2013

    I am working on a Business Data List web part in SPD 2013. I want to customize that complex XSLT that got generated by the web part. It will be really helpful, if I can debug that XSLT. But I am not sure, how to debug XSLT from SPD? If at all, I need to
    debug through Visual Studio also, I need the XML also, which I don't have. Can anyone please help?

    Hi Ven,
    XSLT debugging , I have never heard abt it. Its like UI design and you modify it and test it in Browser. Thats the only way.
    one such sample is http://msdn.microsoft.com/en-us/library/cc300164(v=office.12).aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Hide column header in a SharePoint list web part view ?

     Hi ALl,
    I have a links list in SharePoint 2010 and created a custom standard view to show links on home page.
    I want to hide header column for that particular created list web part view.I have used following css but it's hide all list
    and libraries header column.
    .ms-viewheadertr
      display: none;
    I want to hide specific list web part view column hide.
    Following is a snap in this i want to hide URL column in this view.
    Thanks,
    Balaji More

    You can add the following to an .xsl file and link to it in the "Miscellaneous" options when you edit the web part. By doing it this way, you can reuse the same style sheet over and over.
    This xsl basically overrides a couple of templates located in the "vwstyles.xsl" file, and removes the lines that add the header.
    (This code works in production, but I may not have replicated it properly in this forum, so please test first.)
    <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
    xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt"
    xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
    xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
    xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:SharePoint="Microsoft.SharePoint.WebControls"
    xmlns:ddwrt2="urn:frontpage:internal"
    xmlns:o="urn:schemas-microsoft-com:office:office">
    <xsl:include href="/_layouts/xsl/main.xsl"/>
    <xsl:include href="/_layouts/xsl/internal.xsl"/>
    <xsl:template match="View" mode="full">
    <xsl:apply-templates select="." mode="RenderView" />
    <xsl:apply-templates mode="footer" select="." />
    </xsl:template>
    <!-- Boxed and Boxed No Labels -->
    <!-- Issues Boxed and Boxed No Labels -->
    <xsl:template match="View[ViewStyle=/@ID='12' or ViewStyle=/@ID='13' or ViewStyle=/@ID='18' or ViewStyle=/@ID='19']" mode="full">
    <xsl:apply-templates select="." mode="RenderView" />
    </xsl:template>
    </xsl:stylesheet>
    DH

  • List web part searching - possible to disable filter?

    I have a list with 15,000+ items (don't ask, it's a requirement and it won't change) which we manage by using alphabetical filters A-Z. Everything works great, including the search - by using the filters and an indexed alpha column. The problem is that
    when we have a filter active on the list, the "Find an item" search will only retrieve results from the FILTERED results list. Is it possible to change the "Find an item" search to only display results from the ENTIRE, UNFILTERED list,
    regardless of what filter is currently applied to the list?
    Normally I would imagine the default behavior is desired, but in our case, if a user is directed to the list via the "A" alpha page, they are then unable to search the entire list without going to the requisite letter filter first.
    In other words, here's a typical use case:
    User is directed to the list. The list refreshes automatically (via javascript) to the "A" filtered version of the list, because otherwise SharePoint 2013 displays an error message "Here's the reasons you can't see this list". We avoid
    the error by displaying the "A" filter as the default page first.
    User searches for "Blah" but receives no results. This is because they are on the "A" filtered version of the list, which does not contain any entries starting with "Blah". All entries start with "A" instead.
    -We just want the search behavior to return results from the entire list, without the filter. Is this possible?

    Hi  puargs,
    It is by default  that the “Find an item” search box will search from the displayed item of current list and  we cannot  configure its search scope.
    What do you mean “The list refreshes automatically (via javascript) to the ‘A’ filtered version of the list, because otherwise SharePoint 2013 displays an error message ‘Here's the reasons you can't see this
    list’.  “ ? Could you provide more detail about the error ?
    Also for a workaround, you can create a dedicated search page for managing the list:
    Create a webpage page “Manage List”.
    Add a Search Box Web Part and a Search Result Web Part.
    Edit the Search Result Web Part -> Change query -> In Quick Mode: set  Select a query to Items matching a content  type (System) , set Restrict by app to Specify a URL and input the url of
    your list in the below input box, set Restrict by tag to Don’t restrict by any tag, set Restrict by content type to Item. -> save your configuration.
    Then you can search the item of your list by inputting  keywords in the search box.
    Thanks,
    Eric
    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]
    Eric Tao
    TechNet Community Support

  • 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

Maybe you are looking for

  • Activating onscreen keyboard while connected to bluetooth keyboard

    Hi, I have the Apple bluetooth keyboard connected to my iPad 2 and I was wondering if there was way to activate the onscreen keyboard other then pressing the eject key on the top right of the bluetooth keyboard. Its not a concern when I'm close to th

  • Download PDF file from Application Server in BSP

    Hello, We have a requirement on which we want to download a PDF file stored in Application server using BSP application. I have used function module  ARCHIVFILE_SERVER_TO_CLIENT but this FM will help only if i want to download file from GUI it won't

  • PSE7, how to download images to photo site to make album?

    I am trying to make an online photo book on Shutterfly. How do I "find" the images I want when I use their downloader? With my previous PSE3 I always had duplicates of what was in the organizer in 'Pictures', and it was easy to download from there. 

  • Sharing image library in Bridge

    Hi, I am looking to use Adobe Bridge as a digital asset management system to house images for my department. I am hoping that multiple people from different machines can access the library and add to/edit it, but I am not finding any information onli

  • Syncing iTunes playlist to IPod

    I know this is a no brainer. But I've forgotten how do it. I simply want to take my selected iTunes playlist ( let's say I call it Pete's Playlist) and transport, sync, whatever that Pete's playlist to my iPod, so that the song list is in sequence, a