cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JamesM
Level 8

Guide: A simple guide for connecting PowerApps to Azure Storage Table via Microsoft Flow

If you have seen this post, you would be aware that although the Azure Table Storage adapter is available in PowerApps, it doesn't seem to work. This is bad, because Table storage in Azure provides a super cheap way to provide persistent data storage for configuration, app management, logs etc. It's perfect for PowerApps. 

 

So I set about working around this limitation, and came up with the following model. I use this model to allow me to persist different 'user' settings, and other information between sessions. E.g. is the user currently signed into the app? What version of the app are they running? and so on. 

 

I have written an Azure App Function called azfGetConfig (message me if you're interested in the C# code or any tips on working with Azure table storage in C#). I have provided two ways to use this function, via a GET or POST method. 

 

If using GET, you pass in the following: 

2018-10-14 10_46_24-Window.png

 

 

You provide a user name, and a config value that you want to look up.  In this case I'm looking up what version of the app this user is using. I use PowerApps User().FullName in order to get the users name. 

 

If I'm using a POST, I am saying please create this config  value for this user, or - if it already exists - update it with the new value. 

 

2018-10-14 10_48_12-Window.png

 

As you can see, the value has been updated in the Azure storage table:


2018-10-14 10_49_04-Window.png

So, how to get all this working with PowerApps? Via Microsoft Flow. The following Flow is used to take the info from PowerApps, and pass it to my Azure App Function as a means to interact with the Storage Table(s) - thus bypassing the seemingly broken Azure Table storage connector for now: 

 

2018-10-14 10_36_32-Window.png

As you can see above, I expect two values from PowerApps (in this case for a GET method, I don't need a third parameter for the value of the config parameter I've stored, as I am trying to retrieve it). I store each in a variable, then pass these to my Azure App Function which is available as a web URL (and include my code to authenticate it). The returned value is passed back to PowerApps. 

 

So in my PowerApps button I use the following to get the value of the AppVersion from the table, and pass it back to be stored in the configResponse variable: 

 

Set(configValue, AzureGetConfig.Run(User().FullName,"AppVersion").configresponse)

Hopefully this helps someone else who is interested in working with both PowerApps and Azure Storage Tables, but who was frustrated by the non working connector. Smiley Happy  Any questions let me know Smiley Happy

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Guide: A simple guide for connecting PowerApps to Azure Storage Table via Microsoft Flow

Hi @JamesM,

Thanks for your sharing. I would also share this solution to my colleagues.

 

Best reagrds,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.