cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jhmblvd
Level: Powered On

I have a gallery connected to SQL Table and continually loses the connection when trying to sort

I have a screen with a gallery, the gallery is connected to a SQL table in Azure. If I try to sort the gallery based on text in a search box it loses the connection. The gallery connects to a Azure Table in SQL,  I've removed the table and added it back again, and when I try to place a sort for search on Items it loses the connection. What am I doing wrong?  


Accepted Solutions
jhmblvd
Level: Powered On

Re: I have a gallery connected to SQL Table and continually loses the connection when trying to sort

I was able to correct this, not sure how I just deleted the gallery and added a new one. So not sure why or what was the cause. 


All Replies
Super User Rank
Super User

Re: I have a gallery connected to SQL Table and continually loses the connection when trying to sort

I think the problem is that you are trying to sort the gallery by text in a textbox control. The Sort() and SortByColumns() function work on the field of your database, I suspect that it would be the same field that you are searching Try Sort(Search(azuretable, TextInput.Text, "Somecolumn") ,SomeColumn, Ascending) or SortByColumns(Search(azuretable, TextInput.Text,"Somecolumn"),"SomeColumn",Descending). In the case of Sort(), the column being used for the sort is not enclosed in double quotes. In the case of SortByColumns(), the Columns being used for the sort must be enclosed in double quotes. SortByColumns() is used when you have one or more columns to sort on and Sort() is used when you only have one column to sort on.
Community Support Team Rank
Community Support Team

Re: I have a gallery connected to SQL Table and continually loses the connection when trying to sort

Hi @jhmblvd,

Could you please share more details about the error message within your app?

Further, could you please share a bit more about your Sort formula within your app?

I have made a test on my side, and don't have the issue that you mentioned.

Please take a try to turn off/disable the "Explicit column selection" option and "Improved app rendering (final validation)" option within Advanced settings of App settings, then try your app again, check if the issue is solved.

 

If the issue still exists, please consider take a try to re-create a new app based on your SQL table, then try your Sort formula again, check if the issue still exists.

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jhmblvd
Level: Powered On

Re: I have a gallery connected to SQL Table and continually loses the connection when trying to sort

I was able to correct this, not sure how I just deleted the gallery and added a new one. So not sure why or what was the cause. 

Community Support Team Rank
Community Support Team

Re: I have a gallery connected to SQL Table and continually loses the connection when trying to sort

Hi @jhmblvd,

Have you solved your problem?

I think this issue is a temporary issue with the Gallery control, if you have solved your problem, please go ahead to click "Accept as Solution" to identify this issue has been solved.

 

If you have any other questions in PowerApps, please reply here, I would provide a proper workaround for you.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.