cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Power Apps - Connection to SQL Query and Limit Access by User

Hi Folks, new to the forum and exploring whether Power Apps is a good fit for us. Our data is on Azure SQL Server. We run a service business and have multiple tables in the database. The "Jobs" table has the data that I would like to send via Power Apps to field techs to complete. "Jobs" is relational to "Job Sites", "Customers", "Suppliers" (tech or subcontractor), etc. Therefore, "Jobs" has FK links to PK fields in these tables and won't display "Customer Name", etc, just the "Customer ID", etc. 

 

So, my 2 x questions are:

 

1. Can I link a Power App to an SQL query or how is it best done? The Jobs table alone won't be sufficient.

2. Can I restrict records based on the "Supplier" (or contractor) ID so they can't see other tech's allocated jobs?

 

Just exploring whether the above are indeed possible before we take this further. Appreciate any help from more knowledgeable developers.

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
New Member

Hi Pstork1, Thanks for the reply. Looks like it might have to be an ASP.NET page instead. Appreciate the help.

View solution in original post

2 REPLIES 2
Dual Super User III
Dual Super User III

In Power Apps you normally connect directly to a Table or View in SQL using a connection account. You can simulate SQL queries using functions like Filter(), Sort(), and Search().  But you can't actually run a traditional SQL query or a Stored Procedure.  Also, The connection is done doing a connection account so there is no way to apply specific user permissions to the connection dynamically.

 

You can run traditional SQL queries and Stored Procedures using Power Automate flows.  But the connection is still done using a connection account so the application needs to apply and maintain the permissions.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
New Member

Hi Pstork1, Thanks for the reply. Looks like it might have to be an ASP.NET page instead. Appreciate the help.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (24,253)