Thursday 8 June 2017

Publish Power BI report and export it to SharePoint site

Problem Statement:


After developing reports in Power BI, how to export it to SharePoint site. (Part 1)

Solution:


Power BI provide unique URL for every report developed under it. We have to used that URL to export Power BI report in web application.

Following are the steps to export the reports from Power BI to SharePoint (or any web application):


Step 1: Once you developed reports, go to "Home" tab and click on "Publish" button.


Step 2: After successful publishing, "Success" window will appear. In same window, you will get link to open report online. Click on that link.


Step 3: After opening report online, click on "File" menu then select "Publish to web".
(If your using SharePoint 2016, then click on "Embed in SharePoint" option, copy the link  and update in newly introduce web-part for Power BI).


Step 4: Copy iframe URL.


Step 5: Now go to SharePoint site, edit page where you want to show Power BI report. Click on "Edit Source", paste iframe URL (copy in Step 4).



Step 6: and save the page. Power BI report will get display as shown in below screen shot.


Note: In SharePoint 2016, new web-part is introduce for displaying Power BI reports. So for that, you can directly copy & paste first URL show in Step 4.

Developed Power BI reports using SharePoint list data

Problem Statement:

Our one of the customer using SharePoint 2013 On-Premise version and they want to generate report from SharePoint list data using Power BI reporting tool.

Solution:

Power BI is quite simple reporting tool to use. Here, I am developing one small report in Power BI using SharePoint list data, where end user can view all open and close cases in Pie Chart.

Prerequisite:

  • Create SharePoint list and add some dummy data

Following are the steps to connect SharePoint list and generate Chart:


Step 1: Open Power BI (I am using Power BI desktop version) and go to Home tab. Inside Home tab, select "Get Data" and click on "More...". (You will get all the data source list which you can integrate with Power BI.)





Step 2: Choose "SharePoint Online List" and click on "Choose" button.



Step 3: Popup will appear. Enter SharePoint site URL and click on "Ok" button.



Step 4: Next popup window will ask for type of authentication and credentials. (Based on your authentication type choose proper tab and enter details.)



Step 5: Once you successfully connect to SharePoint site then next "Navigator" popup will showcase you all the lists present in SharePoint site. Choose proper list(s) based on which you have to generate reports in Power BI. After selection of list, click on "Load" button.



Step 6: Blank Power BI page will get open with Visualizations and Fields on left hand side.



Step 7: Choose type of graph from Visualizations window (Here, I choose Clustered Column chart graph) and drag & drop columns as per you requirement (Here, I choose "Department" & "ID1" column for "Axis" & "Value" respectively).
As shown in following screen, graph is ready for end user.



Note: We can also change color, legend, tool-tip etc from visualization widow.

Friday 12 May 2017

How to restrict SharePoint list item from search result

Problem Statement:


SharePoint default search functionality display all list data. Sometime user don't want to display particular list items data in search result, then what is solution?

Solution:

To remove particular list item details from search result follow below steps:

  1. Open list and go to list setting
  2. then go to "Advanced Settings" option
  3. In "Advanced Settings", find out "Search" section
  4. In "Search" section, option called as "Allow items from this list to appear in search results?" is available
  5. By default its "Yes", change it to "No"

Based on SharePoint search architecture, list items will get time to stop displaying from search result.

Product applies to:


  • SharePoint 2010
  • SharePoint 2013
 

Thursday 11 May 2017

Get manager using SharePoint designer workflow

Problem Statement:

Our one of the client come with requirement that they want to send an email to manager who create an SharePoint list item.
So to fulfill this requirement, there are multiple options are available in SharePoint. But its always better to used OOTB approach.

Solution:

In SharePoint, to get manager of particular user one action is present called as "Lookup Manager of a User".This action will give us provision to find manager of particular user from user profile as follow:


Product applies to:


  • SharePoint 2010
  • SharePoint 2013
 

A Workflow lookup cannot be copied & pasted from one email message to another

I was defining email template in SharePoint designer workflow using email action. I have added all necessary columns needed in email template and when I try to save email its showing me following error:



Solution:


After comparing all column I used in email templates I realize that there is problem with column called name as "Occurred Date & Time".
Then I removed "&" and rename column as "Occurred Date and Time" and its works.


But still I faced same issue in different workflow email action and I didn't see any special character in column name. Column detail is as follow:


Alternate Solution:


This time I am go with alternate solution. I create one workflow variable and I stored column value in it. Same variable I used in email template and its work properly.


Please let us know your suggestion on same...

 

Wednesday 10 May 2017

Announcement list template missing in SharePoint 2013

Solution:

When "Announcement" list template is missing from site content then we have to enable "Team Collaboration Lists" site feature.

Following are steps to enable "Team Collaboration Lists":


Step 1: Go to site setting. Click on "Manage site features" from "Site Actions" section:

Site Setting

Step 2: Search for "Team Collaboration Lists" and click on "Activate" button:

Team Collaboration Lists

Product applies to:
  • SharePoint Server 2013
  • SharePoint Foundation 2013

 

Get All SharePoint list items using REST API

Solution:


Here I create 1 variable as follow:


1)      url : REST API with list name

var url = "/_api/Web/Lists/GetByTitle('CRUDList')/Items";

Function:


            function getItems(url) {
                $.ajax({
                    url: _spPageContextInfo.webAbsoluteUrl + url,
                    type: "GET",
                    headers: {
                        "accept": "application/json;odata=verbose",
                    },
                    success: function (data) {
                        console.log(data.d.results);
                    },
                    error: function (error) {
                        alert(JSON.stringify(error));
                    }
                });
            }

Function call:


getItems(url);


Feel free to revert in-case of any query...

Product Applies To:


·         SharePoint Server 2013

·         SharePoint Foundation 2013