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! 

Meet Our Blog Authors
Labels