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

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 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!

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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

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 (29,736)