web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SQL Column name limita...
Power Apps
Answered

SQL Column name limitation

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I have a SQL Column called "MIM-Account" that give error on Search(), "MIMAccount" and "MIM_Account" works.

What is here the limitation?

image.png

many Thanks

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @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."

  • timl Profile Picture
    37,424 Super User 2026 Season 2 on at

    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.

     

    image.png

    Perhaps that's something you could try as a workaround?

    Search(RenameColumns('[dbo].[MIM_Accounts]', "MIM-Account", "MIMAccount"),
     '4LC_Search',
     "MIMAccount"
    ) 

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

  • Verified answer
    timl Profile Picture
    37,424 Super User 2026 Season 2 on at

    @MaVa 

    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.

     

  • MaVa Profile Picture
    8 on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard