Hot answers tagged

6

To average multiple columns in an item, you'd use a calculated column such as =AVERAGE([Column1],[Column2],[Column3]). To average a column, edit the view and expand the Totals section. By your column name, if it's a number, you can select average (etc) from the dropdown.


4

You need the following piece of CSS to ensure that the menu items on the global navigation menus do not break into multiple lines and that the width of the drop-down menu extends to fit the length of the menu items' text: /* Disable menu text wrapping. */ #DeltaTopNavigation ul.dynamic { white-space: nowrap; word-wrap: normal; width: auto !important; ...


3

For client-side implementation, use JSLink to override field rendering. You can also add your javascript dropdown change handler to PostRender function of JSLink. Using server side, you can use event receiver to calculate Due Date on item created and updated events.


2

SP.CamlQuery does not have a property RowLimit , you have to set in the caml markup: camlQuery.set_viewXml("<View><Query> <OrderBy> <FieldRef Name='ID' Ascending='False' /> </OrderBy> </Query> <RowLimit>5</RowLimit> </View>");


2

To fix the problem with the text getting out of the box, use the following solution: ul.dynamic { width: auto !important; white-space: nowrap; } Source: http://blog.sharepointexperience.com/2014/10/increase-width-sharepoint-drop-down-navigation/


2

I only browsed your code You have to look closely at WHERE inside the then resolves your code runs, ie. if (errCnt>0) will run before attachments are found. Also try to merge your code, you have 2 branches that almost do the similar, merge them into one... your code will become smaller.. your code will be easier to debug


2

Your code fails because the Function declaration is wrong: You do: function getdetails( {dosomething} ) But the correct way of declaring a function is: function getdetails() {dosomething} BUT, More potential errors: Your code tries to extract the ID value when it is the first QueryString parameter in the URL So it fails: When ID is not immediatly ...


2

what REST call were you using? You should have been able to get a whole bunch of items using OData filtering. Something like this: var itemtitle = "Some Title" $.ajax({ url: _spPageContextInfo.webServerRelativeUrl + ...


2

Override the PreSaveAction in order to cancel the save. function PreSaveAction() { if (confirm("Confirmez-vous ce choix de réforme ? : ")) { return true; } else { return false; } }


1

On your saveitem button click event call below method $(document).ready(function(){ $( "#ctl00_m_g_9ff78e92_ed40_4212_ae0f_44b787664fa8_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem" ).click(function() { /*var isConfirmed = confirm("Confirmez-vous ce choix de réforme ?"); if (isConfirmed == true) { ...


1

Try this var list = ctx.Web.Lists.GetByTitle(listTitle); list.Hidden = true; list.Update(); ctx.ExecuteQuery(); Source: Hide document library using CSOM Note that in the source they use BreakRoleInheritance to prevent users from accessing the list.


1

You're missing semi-colons. Also, why are are you calling location.reload twice? $(document).ready(function () { $('#btnViewReport').click(function () { location.reload(true); }); });


1

Make the menu items stretch: span.menu-item-text { display: inline-block; white-space: nowrap; } Make the container resize to fit: ul.dynamic { width: auto!important; }


1

It is already mentioned in your REST query. You just need to change the value from 2917 to 1000. Make sure to place that as first parameter like below. https://xxxxxxxxxx/_vti_bin/ListData.svc/MapData?$top=1000&$select=State_abb,County,Indemnity,County_code&$orderby=State asc,County asc It will get only top 1000 records from list.


1

Try this if it works for you. You can avoid first five items using below mentioned listitems.getEnumerator() code. function getItemsToBeUpdated() //this function called on button click to get ID's { var clientContext = new SP.ClientContext.get_current(); var oList = ...


1

Your query is wrong. Try below query instead camlQuery.set_viewXml("<View> <Query> <OrderBy> <FieldRef Name='Mise à jour parc'> </FieldRef> </OrderBy> </Query> </View> ");


1

Like Amal Hashin said, you've opened a <FieldRef>, but you should close it like that : <FieldRef Name='Mise à jour parc' /> <Value Type='Text'>Non</Value> Also I saw a mistake in your code. You use collListItemToBeUpdatedReventeas variable to print the result of the query. The problem is that you use that variable several times in ...


1

Client side rendering or code to set fields won't work in datagrid view. I recommend using a workflow. Using the Wait For action (run workflow on create) is a better option than checking the status every time an item is edited.


1

You need to use Client Object Model. Look in this link for basic operations: https://msdn.microsoft.com/en-us/library/office/jj163201.aspx#BasicOps_SPListItemCRUD Form this links, you have sample to create and delete items(like a move) Create: function createListItem(siteUrl) { var clientContext = new SP.ClientContext(siteUrl); var oList = ...


1

You can use the JavaScript Object Model to create and delete items. For reference, see Common Programming Tasks in the JavaScript Object Model, the SP Namespace, and SharePoint 2010 Client Object Model Hierarchy and Identity. Here's an example function to get you started: function moveItem(sourceItemId){ var sourceListTitle = "My Source List"; var ...



Only top voted, non community-wiki answers of a minimum length are eligible