Tuesday, 17 April 2018

[Solved] SPServices : GetListItems not returning all items from SharePoint list?


'GetListItems' will return items from default list view only.

To overcome this use the following filters:

var cmlQuery="<Query><Where><Neq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Neq></Where></Query>";

CAMLQuery: cmlQuery//Include items which are filtered-out in default view
CAMLRowLimit: 0//Override default view row-limit

Friday, 13 April 2018

How to increase the width of a column in SharePoint 2013 list?


Add the following in script editor:

<style type='text/css'>
.ms-vh-div[DisplayName='Column Display Name']
{
  width:400px;
}
</style>

Thursday, 12 April 2018

Friday, 6 April 2018

How to mass check-in SharePoint library files?


Here is a way to check in multiple files at once:

First, if you don't have ownership of the files then go to library settings. Click on 'Manage files with no checked in version'. Select all and take ownership.

If not already available, create a view with filter as following: 'Check Out To' = [Me].

Go to content and structures from site settings. Go to the view you just created. Select all files and check-in using the action tab.

Tuesday, 3 April 2018

SPServices : How to prepare date data for the SharePoint list date field using JavaScript?


var currDate = new Date();

var numDay=currDate.getDate();
var numMonth = currDate.getMonth();
var numYear = currDate.getFullYear();

var tempDate = (++numMonth)+"/"+(numDay)+"/"+numYear ;
var spDate = new Date(tempDate).toISOString();

//e.g. 2019-08-29T18:30:00.000Z


Note: You may have to adjust numDay based on the timezone.

How to fetch the email of the current user using SPServices?



$( document ).ready(function(){

 currUser = $().SPServices.SPGetCurrentUser({

  fieldNames: ["WorkEmail"],

  debug: false

 });

currUserEmail = currUser.split('p|')[1];

})

How to find the day number from today's date in SharePoint designer 2013?




How to split a string in SharePoint 2013 designer workflow to extract a substring?



How to activate SharePoint 2013 workflows on a SharePoint Online site?


Go to site settings > Workflow settings > Workflow Health > Activate

Monday, 2 April 2018

How to update text and tooltip of default save button in w2ui grid?


var btn = w2obj.grid.prototype.buttons;
btn['save'].text = w2utils.lang('New Text');

btn['delete'].text = w2utils.lang('Reject Selected');
btn['delete'].tooltip = null;

Sunday, 1 April 2018

CAML Query : How to put four AND conditions?


<And>
    <Eq>condition</Eq>
    <And>
        <Eq>condition</Eq>
        <And>
            <Eq>condition</Eq>
            <And>
                <Eq>condition</Eq>
                <Eq>condition</Eq>
            </And>
        </And>
    </And>
</And>