Announcements
Hi,
I have a SQL Column called "MIM-Account" that give error on Search(), "MIMAccount" and "MIM_Account" works.
What is here the limitation?
many Thanks
@MaVa
Per the Microsoft documentation on this subject hypens are not-considered normal characters like letters, numbers and " _ ". Best to stick with those characters for ease of use.
"Column names can contain any valid characters (for example, spaces). If column names contain any characters except letters, numbers, and underscores, the name must be delimited by enclosing it in back quotes (`)."
Link to Official MS Documentation
https://docs.microsoft.com/en-us/sql/odbc/microsoft/column-name-limitations?view=sql-server-ver15
---Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @MaVa
I've just tested this and I'm able to overcome this problem by calling RenameColumns. There doesn't seem to be any delegation problems with this approach either.
Perhaps that's something you could try as a workaround?
Search(RenameColumns('[dbo].[MIM_Accounts]', "MIM-Account", "MIMAccount"), '4LC_Search', "MIMAccount" )
Hi @MaVa ,
Could you please share a bit more about the error with your Search function?
Based on the issue that you mentioned, I think this issue is not related to PowerApps Itself. I agree with @mdevaney 's thought almost. The hypens (-) are not-considered normal characters, if you want to include a hypens (-) within a column name, the name must be delimited by enclosing it in back quotes (`).
You could consider change the column name in your SQL Table or take a try with @timl 's solution to rename the "MIM-Account" column to another name, then specify the another column as Search column within the Search function.
Best regards,
Just to clarify this thing about delimiting names with back quotes (`), this relates to ODBC connections to SQL Server (as specified in the link). It doesn't apply to PowerApps. Delimiting your column name in PowerApps with a back quote won't solve the problem.
So I think really, RenameColumns is the only workaround here. In terms of renaming your column names in SQL, this sometimes isn't possible, particularly if you don't own the database, or if it's already in use by other applications. In this case, a better option is to create a SQL View and to rename the output columns in the view.
Thanks all for your reply, RenameColumns() works perfect.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 224 Super User 2026 Season 2
WarrenBelz 189 Most Valuable Professional
Mohsin Ali 126