Iterating through List View Items using Group By and Jquery

In my listview to my document library, I am using grouping. For each group (using month), it lists all the documents pertaining to that particular month.
Using JQuery, I need to go through each item and parse them, but I'm having trouble finding a usable selector for the for/each function. My parsing code (JQuery) works, but since it uses the class of the table cell with a child anchor, it basically
finds the first item and then all the subsequent file names are named the same (instead of different names, like it should be).
Here's my current code that doesn't work (only the iteration and naming separately for each file - the parsing I'm doing seems to work):
$(".ms-wpContentDivSpace" ).each(function( index ) {
var val=$(".ms-vb2 a").html();
var val2=val.replace(/_/g," ");
$(".ms-vb2 a").html(val2);
any ideas?

That's because
$(".ms-vb2 a").
is bringing back all the pieces that have that class with an anchor on the whole page, not just the ones in the .ms-wpContentDivSpace
I don't know the exact syntax, but I think you need to iterate through all the '.ms_vb2 a' items as well - there are multiple ones, and do something like this inside your other grouping
$(".ms-vb2 a").each(function(index) {
    var val=$(this).html();
   var val2=val.replace(/_/g," ")
   $(this).html(val2);
That's not quite right but maybe that will help.
Robin

Similar Messages

  • List view item display time is taking too much

    Hi,
         I am working in a sharepoint2013 project. In our project , list view item display time is taking too much in IE8 sp2013 64 bit environment. Can anyone help me to resolve this issue?
    Thanks,
    Nabhendu

    Hi Nabhendu,
     We had something similar with our SP2013 and IE8 32-bit. It seems that IE8 was in Compatible mode which make it IE7, which is unsupported by SP2013 due to HTML5.
    Issue : List view especially datasheet view which has been moved from ActiveX to HTML5 had very slow response on SP2013 and IE8 32-bit.
    Resolution : Try Chrome and see if its CSS/Masterpage or SP2013 issues performance issue.
    We deployed masterpage and css which was used in our SP2007 site with minor changes, but later we figured out that we need to make major changes in order to work with IE8 and SP2013.
    Try Indexing Columns.
    check how many look up columns are used.
    Hopefully that may help you..
    Thanks,
    Parth
    Thanks and Regards, Parth

  • Sharepoint autoselection of list view items

    A SharePoint web part page has a set of three list views that depend on each other. For example, Order > Order Details > Products. For filtering, there are Connections defined to Send Row Data from Order to Order Details and from Order Details to Products.
    When the user clicks Order, I would like all of the filtered Order Details list view items to be automatically selected so that all of the Products are immediately visible. Is that possible?

    Hi
    check this solution for dropdown lists
    http://www.itidea.nl/index.php/cascading-dropdowns-with-jquery-and-spservices-on-a-page-or-webpart/
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Can I Change SEARCH to default as LIST view rather than GROUPS view?

    Can I Change SEARCH to default as LIST view rather than GROUPS view?
    I always end up doing a command+2 and if I can default this it would be better.
    THANKS

    Perform a search, click on the List View icon in the Finder window's toolbar, press COMMAND-J to open the View Options dialog, check the box labeled "Always open in list view."

  • Is there a way to keep the checkmark or initials (Sign toolbar) active so that I can check a whole list of items without going back and forth to the button?

    Is there a way to keep the checkmark or initials (Sign toolbar) active so that I can check a whole list of items without going back and forth to the button?

    There is another way to "popup" the screen. Mute and then
    unmute the cellphone.
    Sheng-Chieh

  • How can I deploy EFS using Group Policy and automatically encrypt computers for ALL users who login?

    How can I deploy EFS using Group Policy and Active Directory with a goal to automatically encrypt computers for ALL users who login? (NOT an option for me to use BitLocker)
    I was asked to deploy EFS to encrypt the user my documents folder and profile on all of the users laptops. The laptops are in common areas (board meeting rooms, etc) and security of files is a must.
    I successfully created a recovery certificate in AD. I created an OU and setup an EFS policy and users can now login and select to encrypt their own files. The issue is that management would like to have automaticy Encrypt ALL users my documents AUTOMATICALLY
    when a user login.
    Can this be done?
    Please help

    Hi,
    Any update?
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • How to authenticate with Sharepoint using rest service and jquery

    Hi ,
    I have a requirement where i need to authenticate with  sharepoint from ios and android app using rest services and jquery.
    Can anyone help me in this .
    Thanks in Advance.
    Regards,
    Srinath 

    Hi,
    According to your post, my understanding is that you want to access SharePoint data from IOS and Android app.
    The following materials for your reference:
    How can I authenticate SharePoint REST calls from Android App?
    http://stackoverflow.com/questions/24673373/how-can-i-authenticate-sharepoint-rest-calls-from-android-app
    Calling RESTful services from your Android app
    http://www.techrepublic.com/blog/software-engineer/calling-restful-services-from-your-android-app/
    SharePoint 2013 REST API in iOS
    http://omicron-llama.co.uk/2012/12/13/sharepoint-2013-rest-api-in-ios/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Iterating through master view objects and child view objects in same page

    I am working on a project using ADF UIX and Business Components.
    I have an application module with two view objects one the master view object and the second the detail object. They are related via a view link.
    I would like to iterate through the master view objects displaying a customer name as bold text and then below each customer name I'd like to display the detail records in a table via the detail view object i.e. a seprate table for each customer.
    Is this possible - I haven't had much luck!?
    Thanks in advance.

    That's because
    $(".ms-vb2 a").
    is bringing back all the pieces that have that class with an anchor on the whole page, not just the ones in the .ms-wpContentDivSpace
    I don't know the exact syntax, but I think you need to iterate through all the '.ms_vb2 a' items as well - there are multiple ones, and do something like this inside your other grouping
    $(".ms-vb2 a").each(function(index) {
        var val=$(this).html();
       var val2=val.replace(/_/g," ")
       $(this).html(val2);
    That's not quite right but maybe that will help.
    Robin

  • ADF mobile: how to link task flow to a list view item

    Hi
    I am trying to build a mobile app in adf and i created a popup on the left button on the header. this popup has a list view showing few options.
    now the requirement is to click on the option and navigate to that feature (which is created as a task flow).
    so, i am not sure how do like the task flow to the link in the listView of the popup. Please advise

    Well, if that list contains all features, you can use the 'features' from the ApplicationFeatures DC (they contain the ID, name, ... so you can use #{row.id} instead of hardcoding it).
    If that list does only contain a few features, you can make your own list.
    In your own backing bean or data control, you can get all the features by using:
            ApplicationFeatures af = new ApplicationFeatures();
            af.getFeatures();And filter them.
    An example that I made/use myself:
    It uses an commandLink to navigate because I need to be able to 'disable' (= not clickable) some features (it has the same look as an ListView).
    So iff just use the getFeatures(), you can use the ListView for navigation.
    <amx:iterator var="row" value="#{bindings.features.collectionModel}" id="i1">   
            <amx:tableLayout width="100%" id="tl2" inlineStyle="background-color:White;">
              <amx:rowLayout id="rl2">
                <amx:cellFormat width="50px" height="50px" halign="center" id="cf4" valign="middle"
                                inlineStyle="border-bottom:thin solid #b8b9c8;">
                  <amx:image source="#{row.icon}" id="i2" inlineStyle="width:40px;"/>
                </amx:cellFormat>
                <amx:cellFormat width="100%"  height="43px" id="cf3" valign="middle"
                                inlineStyle="border-bottom:thin solid #b8b9c8;">
                  <amx:commandLink text="#{row.name}" id="cl1" inlineStyle="color:Black; font-weight:bolder; font-size:110%;"
                                   disabled="#{!row.enable}">
                    <amx:setPropertyListener from="#{row.id}" to="#{pageFlowScope.feature}" />
                    <amx:actionListener binding="#{bindings.resetFeature.execute}"/>
                  </amx:commandLink>
                </amx:cellFormat>
              </amx:rowLayout>
            </amx:tableLayout>
          </amx:iterator>This my own data control :
    public class MenuDC {
        private ExtendedFeatureInformation[] features;
        private String message;
        public MenuDC() {
        public ExtendedFeatureInformation[] getFeatures()
            ApplicationFeatures af = new ApplicationFeatures();
            this.fillExtendedFeatureList(af.getFeatures());
            return features;
        private void fillExtendedFeatureList(FeatureInformation[] realFeatures)
            message = "";
            ModelController.getSingletonModelController().refreshMinorTables();
            features = new ExtendedFeatureInformation[realFeatures.length];
            for(int i = 0; i < realFeatures.length; i++) 
                boolean enable = true;
                FeatureInformation fi = realFeatures;
    if(fi.getId().equals("be.kpd.newDayReport"))
    if(ModelController.getSingletonModelController().getVarFormLocalDB(HardcodedVarCodes.LAST_SYNC).equals(""))
    enable = false;
    if(fi.getId().equals("be.kpd.overviewDayReport"))
    if(ModelController.getSingletonModelController().getRegisDFromLastSevenDays().size() == 0)
    enable = false;
    if(!enable)
    message = "SYNC_NEEDED";
    ExtendedFeatureInformation efi = new ExtendedFeatureInformation(fi.getId(),fi.getName(),fi.getIcon(),fi.getImage(),enable);
    features[i] = efi;
    public String getMessage() {
    return message;
    I made my own POJO which implements the FeatureInformation interface,
    because I needed an extra boolean attribute for disabling some features.
    public class ExtendedFeatureInformation implements FeatureInformation {
        private String id,name,icon,image;
        private boolean enable;
        public ExtendedFeatureInformation() {
            super();
        public ExtendedFeatureInformation(String id, String name, String icon, String image, boolean enable) {
            super();
            this.id = id;
            this.name = name;
            this.icon = icon;
            this.image = image;
            this.enable = enable;
        public String getId() {
            return id;
        public String getName() {
            return name;
        public String getIcon() {
            return icon;
        public String getImage() {
            return image;
        public boolean isEnable() {
            return enable;

  • Concurrent modification exception while iterating through list

    Hi,
    I have a list of objects. I use for each loop in java to iterate through that list of objects and display them.
    The problem is that while iterating other thread can add or remove some objects from that list, and I get ConcurrentModificationException.
    How can I handle this problem. How can I be sure that I am iteration through the updated list.
    Thank you

    Synchonize on the list before iterating through it, and make sure that other code also synchronizes on the list before adding to it or removing from it. Using a list implementation that simply synchronizes all the methods (e.g. Vector) will not do that, you have to do it yourself.

  • Show the Read more link in the list view webpart using Client side Rendering

    Hi,
    I have a share point list name as Team.It contains two columns like Role(single line of text) and Name( people and picker).
    I want the display the list view webpart like below format using JS Link/Client side rendering concept.
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Readmore... (Read more link should expand all the team members)
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Could you please provide the code.It is very urgent for me.
    Thanks for the help!!!

    (function () {
        debugger;
        //Create our Namespace object to avoid polluting the global namespace
        var pfh = pfh || {};
        //Define our Header Render pattern
        pfh.renderHeader = function (ctx) {
            var headerHTML = "<ul>";
            return headerHTML;
        pfh.renderFooter = function (ctx) {
            //Define any footer content here.
            var footerHTML = "</ul>";
            return footerHTML;
        pfh.CustomItem = function (ctx) {
            var itemHTML = "<li>" + ctx.CurrentItem.TeamMemberName[0].title; + "</li>";
            return itemHTML;
        //Define any code/function that needs to be run AFTER the page has been completed and the DOM is complete.
        pfh.PostRenderCallback = function (ctx) {
        //Define the function that will register our Override with SharePoint.
        pfh.RegisterTemplateOverride = function () {
            var overrideCtx = {};
            overrideCtx.Templates = {};
            overrideCtx.Templates.Header = pfh.renderHeader;
            overrideCtx.Templates.Footer = pfh.renderFooter;
            overrideCtx.Templates.Item = pfh.CustomItem;
            overrideCtx.onPostRender = [pfh.PostRenderCallback(ctx)];
            overrideCtx.BaseViewID = 98; //Note: We're using BaseView ID 99 to match our override below
            overrideCtx.ListTemplateType = 100;
            SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
        //Now we load in our override to ensure that this Override is only applied to the intended ListView
        ExecuteOrDelayUntilScriptLoaded(function () {
            var OldRenderListView = RenderListView;
            RenderListView = function (ctx, webPartID) {
                if (ctx.ListTitle == "Test") {
                    ctx.BaseViewID = 98;
                OldRenderListView(ctx, webPartID)
        }, 'ClientTemplates.js');
        //Register for MDS enabled site otherwise the display template doesn't work on refresh
        //Note: The ~sitecollection tokens cannot be used here!
        RegisterModuleInit("/_catalogs/masterpage/Display Templates/csr_ovr_RenderListTemplate_Fixed.js", pfh.RegisterTemplateOverride); // CSR-override for MDS enabled site
        pfh.RegisterTemplateOverride(); //CSR-override for MDS disabled site (because we need to call the entry point function in this case whereas it is not needed for anonymous functions)
    I am using the above script to render the items.
    I am new to the CSR.
    Where do i need to include your script in my script.
    Please help on this.
    Thank you for reply sagar.
    Please note that i am not using content search webpart.

  • Web Form Cancel Edit button changes value of List View item when clicked

    I have a web form, I shows 3 buttons, Edit, Save, And cancel. When the user presses the edit button it enables editing. When the user makes an edit and presses the save button it saves the changes. When the user presses the cancel button, it does cancel
    the edit ok but it changes the vale in the left list view to a different value.  For instance my left list view has a list of vendor names.  When I click cancel, the vendor name shown for the selected record, changes to the vendor number.  I
    have experimented with different values to show in the list view, I have turned off sorting, etc.  No matter what everytime I click cancel button it changes the vendor name to the vendor number.
    Even stranger is when I scroll the list up and the item that changed is move out of view and then you scroll back down to put it in view it puts the value back to the vendor name.
    This isn't consistent as I have created some forms where it doesn't do this. 
    Also when I create a new list view, does anyone know how to get it into the tile pane .  the only way to get anything in that list appears to be that I have to create a whole new table.
    Jim

    This forum is for the desktop user interface Windows Forms, its classes, apis and components.
    For a webform try the ASP.Net forums.
    http://forums.asp.net
    Success
    Cor

  • One item used for insert and update

    I'm still trying to learn APEX and need to understand how to use an item for both update and insert. Is the LOV part used for the insert and the SOURCE for the update? I have a WHERE clause I need to use for the insert but not the update. I have to display items when updating that would not show up in the insert b/c only active things should be in the insert whereas the update can contain retired values. Also one such item needs to display its value but hold on to it's ID. Also, I am displaying items from more than one table so I'm not sure if I can say it's a Database Column. AS you can see, I'm really confused and the doc doesn't usually explain these details and is not helping me. Can someone explain how to set up such items? Thank you!

    I do actually have things working (I do have insert, update and delete processes) since I copied from another app, but there are some details that are not working well. For example, I have a linked field that pulls up a record (row fetch) and 2 of the fields do not pull up the values for that row (it's a select list and that's there but it doesn't highlight the correct value). For one of them, when inserting, the LOV (I think) should only show the active values but then, when the row is fetched, it needs to show a value from the table even if it's no longer active. I'm missing something and don't know what it is.

  • Sqlserver query using Group by and Order by

    SUM(BILL_DETAIL.x_bill_quantity) as BILL_QUANTITY,
    MIN(BILL_DETAIL.x_billable_to) as BILLABLE_TO,
    MIN(BILL_DETAIL.x_billable_yn) as BILLABLE_YN,
    AVG(BILL_DETAIL.x_bill_rate) as BILL_RATE,
    MIN(BILL_DETAIL.x_cost_rate) as COST_RATE,
    MIN(BILL_DETAIL.x_cost_total) as COST_TYPE,
    LISTAGG(BILL_DETAIL.objid, ',') WITHIN GROUP(ORDER BY BILL_DETAIL.objid) as ID_LIST
    FROM table_x_gsa_bill_detail BILL_DETAIL
    WHERE (1=1)
    GROUP BY (DECODE(BILLABLE_YN, 1, 'Billable', 'Non-Billable') || ',' || BILLABLE_TO || ',' || DETAIL_CLASS || ',' || COST_TYPE || ',' || BILL_RATE)
    ORDER BY DECODE(BILLABLE_YN, 1, 'Billable', 'Non-Billable') || ',' || BILLABLE_TO || ',' || DETAIL_CLASS ||
    ) dt WHERE rn BETWEEN 0 AND 1
    Can any one pls help me using of Case Condition keyword instead of Decode in the above query ??? iam not able to convert above query for group by and order by..
    Actually i need to do group by the aggragate values which i got the values from the fields of BILLABLE_YN,BILLABLE_TO,DETAIL_CLASS, COST_TYPE, BILL_RATE.
    where as in oracle i can run above query using decode keyword where as in sqlserver iam not able to use BILLABLE_YN field alias of above query in group by .
    i tried like by using following way but it is wrong because here iam not using aggragate values of fields in group by funtion please help me in converting query in sqlserver. GROUP BY (case BILLABLE_YN when 1 then 'Billable' when 0 then 'Non-Billable' else
    'Non-Billable' End BILLABLE_YN + ',' + BILLABLE_TO + ',' + DETAIL_CLASS + ',' + COST_TYPE + ',' + BILL_RATE)
    Krishna

    CREATE TABLE DETAIL
    ([objid] int,[x_billable_to] varchar(19), [x_bill_quantity] int,
    [x_billable_yn] int, [x_bill_rate] int, [COST_TYPE] varchar(19) )
    INSERT INTO
    DETAIL
    ([objid], [x_billable_to], [x_bill_quantity], [x_billable_yn], [x_bill_rate],[COST_TYPE])
    VALUES
    (1, 'Customer', 3, 1, 20,'Parking'),
    (2, 'Customer', 1, 1, 25,'Toll'),
    (3, 'Customer', 2, 1, 20,'Parking') 
    Pls convert following query for executing query in sqlserver  ..for the column ID_List it should return data like 1,2,3
    SELECT * FROM (SELECT 1 rn,
            SUM(BILL_DETAIL.x_bill_quantity)      as BILL_QUANTITY,
            MIN(BILL_DETAIL.x_billable_to)        as BILLABLE_TO,
            MIN(BILL_DETAIL.x_billable_yn)        as BILLABLE_YN,
            AVG(BILL_DETAIL.x_bill_rate)          as BILL_RATE,
            LISTAGG(BILL_DETAIL.objid, ',') WITHIN GROUP(ORDER BY BILL_DETAIL.objid) as ID_LIST
         FROM   BILL_DETAIL
          WHERE (1=1)
     GROUP BY (DECODE(x_billable_yn, 1, 'Billable', 'Non-Billable') + ',' + x_billable_to  +  ',' + COST_TYPE + ',' + x_bill_rate)
          ORDER BY DECODE(x_billable_yn, 1, 'Billable', 'Non-Billable') + ',' + x_billable_to  +  ',' + COST_TYPE + ',' + x_bill_rate
           )dt 
    WHERE rn BETWEEN 0 AND 1
    Krishna
    sounds like this
    SELECT *
    FROM
    SELECT 1 rn,
    SUM(BILL_DETAIL.x_bill_quantity) as BILL_QUANTITY,
    MIN(BILL_DETAIL.x_billable_to) as BILLABLE_TO,
    MIN(BILL_DETAIL.x_billable_yn) as BILLABLE_YN,
    AVG(BILL_DETAIL.x_bill_rate) as BILL_RATE,
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1) AS ID_Listing
    FROM BILL_DETAIL bd
    CROSS APPLY (
    SELECT BILL_DETAIL.objid + ',' AS [text()]
    FROM BILL_DETAIL
    WHERE objid = bd.objid
    FOR XML PATH('')
    )bd1(ID_LIST)
    WHERE (1=1)
    GROUP BY (CASE WHEN x_billable_yn = 1 THEN 'Billable' ELSE 'Non-Billable'END + ',' + x_billable_to + ',' + COST_TYPE + ',' + x_bill_rate),
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1)
    ORDER BY (CASE WHEN x_billable_yn = 1 THEN 'Billable' ELSE 'Non-Billable'END + ',' + x_billable_to + ',' + COST_TYPE + ',' + x_bill_rate),
    LEFT(bd1.ID_LIST,LEN(bd1.ID_LIST)-1)
    )dt
    WHERE rn BETWEEN 0 AND 1
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Updating using java script and jQuery

    Is it possible using javascript and jQuery to update the two forms of this page, in tandem as the fields change? http://www.milesmemorials.com/product-GH54.html  As you can see there are two forms, the first holds all the element choices and has an 'add to basket' button, the other after clicking 'proceed to proof' shows and gathers name, tel, email and all other fields from first form (which will be 'hidden' once this problem is resolved) all that will show will be name, tel and email. Currently what happens is choices are made, the proof button is clicked but if a selection is then changed the duplicate elements in form2 are not updated unless the proof button is clicked back and then clicked again. This can result in incorrect information being submitted. So going back to my original question, Is it possible using javascript and jQuery to update the two forms in tandem as the fields change?
    Any help really appreciated!!

    Thank you for your post. I think thats just what im looking for. So this is one of my form elements -
    <select name="colour" class="productButton"id="colour">
            <option selected value="0">-- Select colour --</option>
            <option value="2442">Galaxy black granite (&pound;2442)</option>
            <option value="2134">Black granite (&pound;2134)</option>
          </select>
    and i need to make this form field update when the element above is changed -
    <input name="colour2" id="colour2" type="text" />
    What do i need to change on this javascript to make this function work?
    <script> $( "select" )
      .change(function () {
        var str = "";
        $( "select option:selected" ).each(function() {
          str += $( this ).text() + " ";
        $( "div" ).text( str );
      .change();
    </script>

Maybe you are looking for

  • Legal Issues & Skype Alternatives

    Hello, There is a range of issues with Skype/Microsoft which are quite important at this time. I am wondering if those issues can be resolved in a legal way, and if the following actions taken by skype, are in fact, withing the law. The first questio

  • Adobe Indesign CC2014 and mac freeze crash at dialog box "nouveautés"

    Hi ! Adobe Indesign CC2014 and the mac freeze crash when the dialog box "nouveautés" appears ! The Indesign CC work fine and doesn't crash, but the CC2014 freeze on this dialog box ! Is there a possibility to do this dialog box don't appears ? In pre

  • Backorder status in 11i

    Is there any other ways to find or identify backordered order line in 11.5.2 than look for order line status = Awaiting Shipping and trying to a open Pick Wave Move Order from Inventory and Move Orders? When backorder is created from Ship Confirm, on

  • Hypermedia Cneter MSI tv@nywhere Problem on Vista

    Hi. i am new to this forum. Im having a problem with my MSI TV@NYWHERE Pro card ( http://global.msi.com.tw/index.php?func=proddesc&maincat_no=132&prod_no=1396 ) on Windows Vista Home premium eidition. I installed the drivers and Hypermedia center on

  • Rules applied to multiple cells trigger color changes when any of the cells

    "Rules applied to multiple cells trigger color changes when any of the cells meet the rule's condition." That's what Help says, but when I follow the directions, it doesn't work. This is in Numbers 08. I have a table where the contents of one column