Posts

Showing posts from January, 2019

Enable empty SP search textbox does not update results

Hi Guys, This post is about enabling empty search queries. By default, when user press 'Enter' on an empty Search Box, nothing happens.  A very simple question might be asked that why would anyone search for empty string any way?  True, no one actually needs it desperately but while going in flow this case could cause user bed experiences because users are likely to start with the refiners. Problem: Consider this flow: Navigate to SharePoint Search page Search with any keyword like "Test" If search results are not relevant, I just removed Test keyword from the textbox and hit search button. Nothing actually happens here. It suppose to clear all existing results. Without the ability to search for the empty string (or a "clear" button), the only way to do same would be to reload the page. Solution:  The Search Box webpart supports empty string search. Yes, its true, it's just disabled by default.  This feature is controlled by a property,  A

Get user information SharePoint using REST Api

Hi, While working on a requirement, I encountered a scenario where I need to show welcome pop up to the first time users. First time user, SharePoint does not provide any api or any solution which gives information about users who logged on first time on your web site. I have documented the whole solution on some other post( Add welcome pop up for first time users of your site using AngularJs Material ) But this post I only want to scope it to retrieve information of logged on user. Information mean current user's accountId, First name, Last name, Email and other required details. I am only talking about client side code here i.e. using REST api or SP default APIs. Below are the various ways to get the property of current user who is logged on to SP site. There are many ways to achieve this requirement but I prefer to use SP.UserProfiles.PeopleManager Api to get it. It gives us vast option to retrieve any user information. Here are some details of getting various details: Ge

Add welcome pop up for first time users of your site using AngularJs Material

Image
Hi Guys, We really do only have one chance for putting a first impression for end users on our website. User's will never land back to your website if there is nothing interesting found on web site. Same logic works for SharePoint sites too. When a visitor lands on your site for the first time (and maybe the last), how you welcome them will have a big impact. This can be accomplished with pop-up boxes, fullscreen welcome mats, live chat invitations, and more. This post is all about a welcome popup on SharePoint site. In brief, I try my best to provide very easy solution of showing welcome pop up. Requirement:  One of my recent project client asked to show a welcome message. Server side webarts are not promoted by out clients because our site was built in SP online. It sounds very easy but complication added by showing this pop up only once per user. Solution : As a solution, i suggested to achieve this using Content editor web part. Just place some quick JS code on the land