cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LaelH
Advocate III
Advocate III

SQL HierarchyID and PowerApps

Hi,

 

I have a traditional SQL hierarchy table (id points to parentid in the same table).   I am trying to make use of the SQL HierarchyID to see if I can get any improved performance but PowerApps wants nothing to do with this table as a data source.  I get this error :

"Service call was successful. However, there was a problem processing the server response. Please refresh your data source and republish your app."

I get it if I try and add the table to "items" on a gallery, or if I try and collect the records into a collection , or patch any record or remove any record.  

 

LaelH_1-1599919098152.png

 

Any ideas, other than removing HierarchyID from the table and giving up on the performance benefits?

 

Thanks

Regards

Lael

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @RandyHayes 

 

Thanks for the feedback. It sent me down another thought path which resulted in a nifty workaround which means I don't have to abandon my HierarchyID and its associated efficiencies.

 

1) I created a SQL view of the table, but without the Hierarchy ID in it, so that any PowerApps front-end work can be done off that view. 

2) Then for the required back-end table action (insert, update, delete) I created a very simple generic Flow called SQLQuery, which allows me to construct any query I want in PowerApps and send that to flow for execution.

 

eg:  SQLQuery.Run("Update MyTable set MyColumn = 1 where ID = 1")  

 

 

LaelH_6-1600414315418.png

 

So I have got the best of both worlds now and my issued is resolved.

Thanks again for pointing out that documentation.

 

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@LaelH 

You'll need to abandon the HierarchyID - it is not supported in the SQL connector.

Take a look at the docs on datatypes supported - you'll see a note about types not supported, it includes the HierarchyID.

 

Sorry to say...but that will be what you need to do.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

 

Thanks for the feedback. It sent me down another thought path which resulted in a nifty workaround which means I don't have to abandon my HierarchyID and its associated efficiencies.

 

1) I created a SQL view of the table, but without the Hierarchy ID in it, so that any PowerApps front-end work can be done off that view. 

2) Then for the required back-end table action (insert, update, delete) I created a very simple generic Flow called SQLQuery, which allows me to construct any query I want in PowerApps and send that to flow for execution.

 

eg:  SQLQuery.Run("Update MyTable set MyColumn = 1 where ID = 1")  

 

 

LaelH_6-1600414315418.png

 

So I have got the best of both worlds now and my issued is resolved.

Thanks again for pointing out that documentation.

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,709)