Hi Teams,
My Clients want to hide the information when there is no items in the list:
Can this be done with CSS or JavaScript ?
Thanks for any help
Hi Teams,
My Clients want to hide the information when there is no items in the list:
Can this be done with CSS or JavaScript ?
Thanks for any help
Hide any Table header in jquery data table export to excel
complete:function(data){
$('#TableID').DataTable( {
"scrollCollapse": true,
"paging": false,
dom: 'Bfrtip',
buttons: [
'copy',
'csv',
'excel',
'pdf',
{
extend: 'print',
text: 'Print all',
exportOptions: {
modifier: {
selected: null
}
}
}
],
select: true
} );
}
want to hide 1st column in exported excel :
<th class="noExport"> <input type="checkbox" class="AllSelectedTableID"/>Select all</th>
Shiv Sharma
Hello,
I have list named as "Credits" which includes column as : User Name, Credits earned, Earned on.
Suppose it contains data as below:
=====================================
User Name | Credits | Earned On |
Jay | 150 | 1-Feb-20 |
Jesper | 100 | 1-Jan-20 |
Jay | 200 | 5-Feb-20 |
Mads | 150 | 15-Jan-20 |
Jay | 150 | 1-Feb-19 |
Jesper | 100 | 1-Jan-19 |
=====================================
So, I want to display details in web part as follow:
=====================================
Jay = 350
Jesper = 100
Mads = 150
=====================================
Details should be displayed for current year with top ranking person and data should be refreshed whenever new entry added/updated in the list
Can you please guide me if this is possible to achieve using javascript in script editor web part.
Thanking you in advance.
Have a nice day.
Regards,
Jayashri
Sharath Aluri provided this script in a previous post, and it worked perfectly to disable versioning in a SharePoint online (365) library. Thanks so much to Sharath!
Does anyone have any ideas on how to enhance this script by deleting previous versions of all documents (except for the current version) in a given SharePoint online document library? This would likely require a foreach {} loop to loop through each item/file in the library, check its version number, then delete if that number is not equal to the current version.
Thanks!
#Set Parameter $SiteURL="https://globalsp.sharepoint.com/sites/sharath/disable" $ListName ="Documents"#Connect to the siteConnect-PnPOnline $SiteURL -UseWebLogin#-Credentials (Get-Credential)#Set versioning settings of the ListSet-PnPList-Identity $ListName -EnableVersioning $False
I have the following script that I am trying to use the results to populate a piechart. However the lookup field called CountTask is preventing the populating of the chart as it is looking for a string(numbers are in that field but in my first test I used the title field so I know that string will work)
How do I output the lookup field value of that item? Your help is greatly appreciated.
ClientContext context = newClientContext("http://*******/sites/C***C");
List lstOReq = context.Web.Lists.GetByTitle("EnhancementStatus");
CamlQuery oquery =newCamlQuery();
oquery.ViewXml ="<View><RowLimit>100</RowLimit></View>";
ListItemCollection items = lstOReq.GetItems(oquery);
context.Load(lstOReq);
context.Load(items);
context.ExecuteQuery();
DataTable otable =newDataTable();
otable.Columns.Add("Id");
otable.Columns.Add("Title");
otable.Columns.Add("CountTask");
foreach(ListItem iteminitems)
otable.Rows.Add(item.Id, item["Title"], item["CountTask"]);
AEStatus.DataSource = otable;
AEStatus.DataBind();
Thank you
IPW
faye fouladi
Hi there,
I would like to use spaudit api to extract some documents behavior logs, if I use the sPAuditQuery.RestrictToUser() method, we need a User ID, such as sPAuditQuery.RestrictToUser(UserID). my question is how I should get user ID? currently, my method is ElevatedWeb.EnsureUser(spusername).ID --> Is it correct?? I use thePeople Picker
Thanks
Hi there, if you found my comment very helpful then please | Propose as answer | . Thanks and Regards.
Hello Techies,
I have a task list with around 5000 items and would like to create a pie / doughnut chart based on task status.
Any idea how to go with it using rest api.
Here are the status values : On Hold, On Track, On Watch, Closed and Troubled
Though I have created bar and line charts using jslink approach:
https://www.linkedin.com/pulse/create-charts-using-chartsjs-highchartsjs-sharepoint-2013-annam/
Hi,
I am using chart,kindly let me know to increase its width
My code:
Thanks
Hello everyone,
I've just created an Event Receiver as explained on all the sites on the Internet. So I created a new projekt with an Event Receiver for "ItemAdding" on my Page Library inside my Enterprise Wiki. I want to change the Title when a new Page is created. When a new Item gets created he jumps right into my Visual Studio Debugger. So it gets fired! That works fine! But he doesn't change anything! There is no Exception! He just runs over my code but I can't see any changes afterwards. This is the code:
/// <summary> /// An item is being added. /// </summary> public override void ItemAdding(SPItemEventProperties properties) { properties.AfterProperties["Title"] = "test"; base.ItemAdding(properties); }
What's wrong here? I really don't know what to do. Thanks!!!
Regards
Chris
Hi,
I want to join 3 libraries in a grid-view.
I did it but only texts were copied and pasted in new grid-view.
Can anybody tell me how can I get link of each row? Here is my code:
protected override void CreateChildControls() { try { var list = SPContext.Current.Web.GetList(SPUrlUtility.CombineUrl(SPContext.Current.Web.ServerRelativeUrl, fldListUrl1)); var gv = new SPGridView(); gv.AutoGenerateColumns = false; gv.EnableViewState = false; foreach (string vwfield in list.DefaultView.ViewFields) { SPField field = list.Fields.GetFieldByInternalName(vwfield); if (field.Hidden == false) { BoundField boundField = new BoundField(); boundField.HeaderText = field.Title; boundField.DataField = field.InternalName; gv.Columns.Add(boundField); } } var dt = list.GetItems().GetDataTable(); var list2 = SPContext.Current.Web.GetList(SPUrlUtility.CombineUrl(SPContext.Current.Web.ServerRelativeUrl, fldListUrl2)); var dt2 = list2.GetItems().GetDataTable(); foreach (DataRow r in dt2.Rows) { var row = dt.NewRow(); foreach (DataColumn c in dt.Columns) { row[c.ColumnName] = r[c.ColumnName]; } dt.Rows.Add(row); } gv.DataSource = dt; gv.DataBind(); Controls.Add(gv); } catch (Exception e) { Controls.Add(new LiteralControl(e.ToString())); } }Thanks for your help
Hi,
I am creating view to show user's record which filter on "sharedby" column of list, although data is available on list
Problem:
Data is not showed on view when I apply filter on "sharedby" column to show "relevenet user;s" view.
Solution:
how can I apply filter on custom column to show data ( below is image attached )
Thank
Hello SP Gurus - In the preparation of migration to the cloud, I need to get the list of Most Recent updated and Most Historic Items from each libraries from each sites. Is there ant tool available or I need to code to get the list?
Thanks & Regards,
Khushi
I am creating a dynamic table from a SharePoint list and displaying it on a page. the way I am looping through the listitems and finding a match with certain categories which incidentally creates a lot of duplicates. I found the code below to eliminate duplicates:
var seen = {};However, what I really need is to eliminate duplicates between two <tr>s with <tr class="content_header">. In other words, I would like to remove all duplicates that fall between two trs with class="content_header". How can I modify the code above to achieve what I need? the above code removes all duplicates, but I need some duplicates as long as the duplicates are not within two rows with class="content_header" as these rows are my collapsible rows.
Any idea?
faye fouladi
When I use the code snippet below to delete itemCollection, it will throw error:
The collection was modified. Enumeration operation may not execute.
Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQuery); clientContext.ExecuteQuery(); clientContext.Load(list); clientContext.Load(listItems); clientContext.ExecuteQuery(); foreach (Microsoft.SharePoint.Client.ListItem item in listItems) { item.DeleteObject(); clientContext.ExecuteQuery(); }What's the right way to delete all items in a collection ?
I have a web part with spfx and ui fabric modal that show a image, in ie 11, it shows the error:
[SPLoaderError.loadComponentError]:
**Failed to load component "b86df2da-ab09-4919-b8ac-8cf98bc505eb" (CustomPopUpWebPart). Original error: **Failed to load entry point from component "b86df2da-ab09-4919-b8ac-8cf98bc505eb" (CustomPopUpWebPart). Original error: Unknown error
when loading module "b86df2da-ab09-4919-b8ac-8cf98bc505eb_0.0.1"
***INNERERROR:
***Failed to load entry point from component "b86df2da-ab09-4919-b8ac-8cf98bc505eb" (CustomPopUpWebPart). Original error: Unknown error when loading module "b86df2da-ab09-4919-b8ac-8cf98bc505eb_0.0.1"
***CALLSTACK:
Error
at t._generateErrorStackForIE (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:4:53801)
at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:4:53337)
at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:20:104419)
at e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:20:114381)
at e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:20:110406)
at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:20:100569)
at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:1:18051)
at C (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:1:18027)
at q (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:1:17872)
at L (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_5ec6864dd8c7172093e629d6f57b65ef.js:1:17450
$(function () { var endPointUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/GetFolderByServerRelativeUrl('mydocs')/Files?$selelct=Name,File/LinkingUrl&$expand=File"; var headers = {"accept": "application/json;odata=verbose" }; jQuery.ajax({ url: endPointUrl, type: "GET", headers: headers, success: function (data) { var _Rows = data.d.results.map(function (a) { var rObj = {}; rObj["Name"] = a.Name; rObj["LinkingUrl"] = a.LinkingUrl; return rObj; }); new Vue({ el: '#adminsSDS', data: { rows: _Rows } }); } }) });Not able to get the link right to display it in a page?
Abenet