cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

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
Highlighted

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
Highlighted
Super User III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,497)