cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Azure Blob Storage and Azure SQL together with PowerApps

Introduction

This blog walks you through how you can leverage both Azure Blob storage and Azure SQL simultaneously by building a relationship between the two.

My video walks you through a step-by-step instruction on how this works. However, I've recommended you watch the first 12:45 of Shane Young's video first since he walks you through how to create the Azure Blog storage service. --> powerapps azure blob storage connector

 

 

Here's the SQL Query that to build your Azure SQL Table. You can add a different name to your table if you wish.
 

CREATE TABLE AzureBlobStorageDemo(

ID int IDENTITY (1,1) PRIMARY KEY,
FileName nvarchar(100) NULL,

FirstName nvarchar(500) NULL,
LastName nvarchar(500) NULL,

Description nvarchar(500) NULL,

Created datetime NULL,

CreatedBy nvarchar(500) NULL,
CreatedByEmail nvarchar(1000) NULL

)

 

 

Here's the formula for the submit button.

 

Set(AzureBlobIDVar,AzureBlobStorage.CreateFile("powerapps",ABSTextInput.Text,AddABSMediaButton.Media).FileLocator);

 

Patch('[dbo].[AzureBlobStorageDemo]',Defaults('[dbo].[AzureBlobStorageDemo]'),{

   FileName:ABSTextInput.Text,

   AzureBlogID:AzureBlobIDVar,

   FirstName:FirstNameTextInput.Text,

   LastName:LastNameTextInput.Text,

   Description:ASSTextInput.Text,

   Created:Now(),

   CreatedBy:User().FullName,

   CreatedByEmail:User().Email

}  

);

Reset(FirstNameTextInput);Reset(LastNameTextInput);Reset(ASSTextInput);Reset(ABSTextInput);Reset(AddABSMediaButton)

 

Here's the formula for the Delete icon

 

Select(Parent

Concurrent(

Remove('[dbo].[AzureBlobStorageDemo]',ThisItem),

AzureBlobStorage.DeleteFile(ThisItem.AzureBlogID)

);Refresh('[dbo].[AzureBlobStorageDemo]')

 

Here's my step-by-step video

 

Comments

Thank you, the return id value was exactly what I was missing! 

Anonymous

How do you retrieve this data now?

Meet Our Blog Authors
  • PowerApps Community Mentor 2018, Practicing surgeon and former Professor of Surgery, University of Illinois, Chicago.
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • My name is Timothy Shaw and I create digital solutions using the Power Platform, Office 365, and Azure SQL and handle the IT for a small company in the energy sector. When not building the future :), I enjoy playing guitar, good (or really bad!) sci-fi, Xbox therapy, and hanging with my wife and son. Twitter: @ShortForTim