Logic Apps, Flow, PowerApps – Extracting List Data to Excel, One Record at a Time.

Today I was faced with an enjoyable challenge.  I was asked to determine if it was possible to create an entry form within Office 365 that could collect data and then email the data collected within the entry form to someone as an attachment.  The attachment had to be in a Excel compatible file format with column headers.

I started off by creating a simple list in SharePoint Office 365. In this test case, my list is titled; Job Requisition.  Here I have a few columns of different data types titled “Job Title” (Single Line of Text), “Job Description” (Multi-line Text Box), “Department” (Choice) “Hire By Date”(Date), “Salary” (Number)

powerapp1

I created a mobile PowerApp form to modernize the user input experience, however a regular list input forms work just as well.  Once a user fills out the input form, data is saved to the list.

powerapp2.PNG

In this example, I decided to use Flow as my programming platform, though in production, Logic Apps may be the preferred solution of choice.

The Flow has 4 steps:

  • Initiation
  • Composition
  • CSV Creation
  • Send Email

powerapp3.PNG

Step 1 – launches the Flow based around a new item being created

 

Step 2 – is a data operation step where we extract the data from the current item list entry into an  array.  I must admit this step was a bit tricky as the syntax isn’t well documented.  

I decided to use the Data Operation – Compose action and then utilize the expression builder to extract the array from the trigger output of the current item that the Flow is running against.

Here we can see how the expression builder is being used to create the array for the object.

powerapp4.PNG

Here is the syntax for the expression.

createArray(triggerOutputs()?[‘Title’]?[‘Job Description’]?[‘Department Value’]?[‘Hire By Data’]?[‘Salary’])
You’ll notice the syntax is a little goofy.

 

Step 3 – Next we use this object created from the array to create a CSV table using another data operation action.

You are also able to create column headers and determine the “values” under the header from the object created by the array.

This allows us to select the display value and not the stored value for drop downs.  We can also use this to help strip out html and markup from our data results

powerapp5.PNG

Step 4 – We use the Send an Email action to build our email. The trickiest part here is specifying the file format we are using and defaulting this to an Excel friendly format.  Since we are using the Create CSV Table action in Step 3, we are able to give our file a generic name with the “.csv” extension for Microsoft Excel to automatically open the file.

powerapp6

Here is the email that is sent.

powerapp7

Here is the CSV / Excel file that is generated.

powerapp8.PNG

Pretty cool and useful. This is also functionality that was not available in InfoPath unless code behind was used.

Advertisements

Scaling SharePoint 2016 On-Premise for Office 365 like performance

I’d like to preface this post with that fact that I will not be focusing on high-availability, disaster recovery, Site Collection and Database allocation, disk subsystems, physical verses virtual server environments, bandwidth, and backups.

Perhaps it is a combination of Microsoft’s release cycle and the changing of the seasons but lately I have been seeing an influx of SharePoint 2016 On-Premise deployments.  Most of these SharePoint 2016 On-Premise deployments are upgrades to SharePoint 2010 and SharePoint 2013 On-Premise environments for customers whose organization is not Cloud ready yet for one reason or another. This recent end of the year demand has led me to come up with a way of comparing Office 365 SharePoint and SharePoint 2016 performance and readiness experience.

The Client’s whose deployments I would like to ‘blog’ about are ranging from 150-500 users with approximately 2 terabytes of SharePoint content.

If we follow Microsoft’s performance scaling for my SharePoint 2016 environment, Microsoft would recommend the following approximate configuration.

Server Specifications – Sample 1

Server Item Quantity
SharePoint 2016 Application / Web Front End CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 300GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SQL Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 2000GB
    E Drive: 2000GB
    L Drive: 2000GB
    T Drive: 500GB
  Operating System Windows Server 2016
  Application SQL Server Standard 2016

While the above configuration will run SharePoint 2016 the first performance concern we will notice will be related to Search Indexing.

When we attempt to index and crawl content in the above configuration, the page serving performance of our SharePoint environment will be dramatically degraded.  To solve that challenge we need to add at least one dedicated Indexing / Crawling Server.

Server Specifications – Sample 2

Server Item Quantity
SharePoint 2016 Application / Web Front End CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 300GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Index CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 400GB
    D Drive: 500GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SQL Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 2000GB
    E Drive: 2000GB
    L Drive: 2000GB
    T Drive: 500GB
  Operating System Windows Server 2016
  Application SQL Server Standard 2016

Of course, now we will have adequate page loading times without performance being degraded by Search Indexing, however our Search Query performance may slow.  To address this performance degradation, we will need to add a dedicated Search Query server.

Server Specifications – Sample 3

Server Item Quantity
SharePoint 2016 Application / Web Front End CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 300GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Index CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 400GB
    D Drive: 500GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Query CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SQL Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 2000GB
    E Drive: 2000GB
    L Drive: 2000GB
    T Drive: 500GB
  Operating System Windows Server 2016

Now we will have adequate Search and page loading performance, but what if we start to utilize a lot of background services and workflows, our page load times will decrease as our Application server is also our Web Front End, so again, we must increase our server footprint.

Server Specifications – Sample 4

Server Item Quantity
SharePoint 2016 Application CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 300GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Web Front End CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Index CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 400GB
    D Drive: 500GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Query CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SQL Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 2000GB
    E Drive: 2000GB
    L Drive: 2000GB
    T Drive: 500GB
  Operating System Windows Server 2016
  Application SQL Server Standard 2016

And last but not least, our user base really would like the features of Office Online Server with the ability to Co-Author and work on Microsoft Office documents within the web browser, so once again, we must expand our configuration to the following.

Server Specifications – Sample 5

Server Item Quantity
SharePoint 2016 Application CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 300GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Web Front End CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
Office Online Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Index CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 400GB
    D Drive: 500GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SharePoint 2016 Search Query CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 100GB
  Operating System Windows Server 2016
  Application SharePoint Server 2016
     
SQL Server CPU 4 Cores – 64bit
  RAM 24GB
  Approximate Hard Drive Configuration C Drive: 100GB
    D Drive: 2000GB
    E Drive: 2000GB
    L Drive: 2000GB
    T Drive: 500GB
  Operating System Windows Server 2016
  Application SQL Server Standard 2016

As you can see, without mentioning backups, high-availability, and disaster recovery; the footprint for a SharePoint 2016 On-Premise environment with comparable performance to SharePoint within Office 365 will be rather large and costly.