cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JDog
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
JDog
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
Pstork1
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.
JDog
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (81,283)