none
in HTML table bind time first checking duplicate and remove duplicate it works fine when i am passing method in TD it not working properly,please check where i am doing mistake. RRS feed

  • Question

  •  

       
                                       "<TR class='bodyrow'>"+
                                          "<TD>"+ SrNo  + "</TD>" +
                                           "<TD>"+spend+"</TD>" +
                                           "<TD>"+dept Array[i]+"</TD>" +
                                           "<TD id='mach'>"+mandrake(srpend,deptArray[i])+"</TD>" +
                                           "<TDid='checker pending'></TD>" +
                                           "<TDstyle='cursor: pointer;'>"+myCount+"</TD`>" +
                                        "</TR>"
                    function makerpending(srpend,deptArray)
                       {
                            clientContext = SP.ClientContext.get_current();
                            website = clientContext.get_web();
                            clientContext.load(website);
                            Lists= website.get_lists();
                            clientContext.load(Lists);     
                            List =Lists.getByTitle('Tranche1Data');
                            var triggerIdQuery = '<Eq><FieldRef Name="DataId"/><Value Type="Number">'+srpend+'</Value></Eq>'
                            var departmentquery = '<Eq><FieldRef Name="Department"/><Value Type="Text">'+deptArray+'</Value></Eq>'
                            var finalQuery  =   '<And>' + triggerIdQuery + departmentquery  + '</And>';
                            alert(finalQuery);
                            var finalQuery1 = '<View><Query><Where>' + finalQuery + '</Where></Query></View>';
                            var camlQuery = new SP.CamlQuery();               
                            camlQuery.set_viewXml(finalQuery1);
                            ItemColl = List.getItems(camlQuery);
                            clientContext.load(ItemColl);
                            clientContext.executeQueryAsync(makerPendingSuccessed, makerPendingfailed);
                        }                   
                        function makerPendingSuccessed()
                        {
                            var makerpending = 0;
                            var checkerPending = 0;
                            var i =0;
                            var tistItemEnumerator = ItemColl.getEnumerator();
                            while (tistItemEnumerator.moveNext())
                            {
                                i++;
                                var ooListItem = tistItemEnumerator.get_current();
                                var  Status=oListItem.get_item("Status").get_lookupValue();
                                if((Status =="Rejected") || (Status =="Pending"))
                                {
                                    makerpending  = makerpending +1;
                                }  
                     var pan   =  document.getElementById('maketrpending');    
                          pan.innerHTML = makerpending;
                            }
     }
    Monday, December 28, 2015 7:44 AM

Answers

  • jyotikar1982,

    Well your first mistake is that you have posted to the wrong forum. This forum is dedicated to questions/issues about customizing and programming Microsoft Project, a project management application. I suggest you delete your post here and then start with the following forum:

    https://social.technet.microsoft.com/Forums/en-US/home?category=usingforums

    John

    Monday, December 28, 2015 3:49 PM