I am new to PowerApps and still learning. It seems sometimes the editor likes to column names with spaces to be entered as 'Student Last Name' and other times Student_x0020_Last_x0020_Name. Sometimes it autofills one and sometimes the other? Can anyone explain why?
Also as an add-on question why does autofill with commands properly space over but autofill with column names does an overwrite of following text? Drives me nuts when the autofill erases a bunch on line since I never know when it is going to do it.
Solved! Go to Solution.
Hi @BrianHFASPS & @PaulD1
Can't answer why it may be suddenly changing throughout the app (although My experience is that when you open and refresh an App it may enable some of the preview features, which Display Column Names is currently pushed into), however I think I can give some thoughts on the other parts.
I use SharePoint currently as a storage medium due to current company requirements, so I don't use the Search function as it's not delegable from SharePoint, So, I can't really know for sure what the backend of PowerApps does when dealing with these, but if we look at the documentation for these functions we can assume some kind of answer by making an educated guess:
Filter( Table, Formula1 [, Formula2, ... ] )
LookUp( Table, Formula [, ReductionFormula ] )
..So both of these functions are looking for a Formula, and my gut tells me that due to this, when searching by Display Name, a function will be able to discern the internal/static name from that.
So, getting back to the topic at hand,
Search( Table, SearchString, Column1 [, Column2, ... ] )
Description:
So we can see there that it outright states that column names must be static, so from the database side I would think it is only going to look for the internal/static name of the column, and they must be enclosed in double quotes.
So, I would think (going back to original question) that it would depend on whether you are using the Search function rather than Lookup/Filter as to whether it wants:
'Name Name' or Name_x0020_Name - which are usually interchangeable within Lookup()/Filter() due to it looking for a Formula (which I am Assuming can do intelligent lookups)
or
"Name_x0020_Name" - which will be looked for as an internal/static name by Search()
If either of you have any counter-examples of this where the preview feature is disabled please do share, as this whole reply is going on my assumptions on how PowerApps is viewing and dealing with internal/static/display names within these functions based on the documentation provided 🙂
Cheers,
Hi @BrianHFASPS
Are you using SharePoint as your storage medium by chance?
Regards,
Are you using SharePoint as your storage medium by chance?
I was and then rebuilt app with storage being in an Azure SQL instance.
Hi @BrianHFASPS thanks for your post and sorry to hear you're experiencing these issues.
@iAm_ManCat are you able to assist with the updated information provided?
Could this be related to the Preview feature 'Use column display names'?
I have noticed that the two naming conventions (spaces vs _x0020_) seem to be used inconsistently in some functions (SortByColumns springs to mind, but I'd need to check to be certain).
I had one app where it would accept one convention and work but then after a few edits would force me to change all the names to the other convention, but I haven't had that recently, so perhaps it was resolved.
It seems to work either way, it is just confusing sometimes where it seems to flip back and forth. Then the overwrite instead of insert on autofill is maddening. I do a lot of CTRL-Z or ESC to get back overwritten code.
One more addition to this I learned today. Search() will only accept "Student_x0020_Name" and not "Student Name" at least with SQL. It seems every other command with take with space but maybe since Search require "" instead of ''?
Hi @BrianHFASPS & @PaulD1
Can't answer why it may be suddenly changing throughout the app (although My experience is that when you open and refresh an App it may enable some of the preview features, which Display Column Names is currently pushed into), however I think I can give some thoughts on the other parts.
I use SharePoint currently as a storage medium due to current company requirements, so I don't use the Search function as it's not delegable from SharePoint, So, I can't really know for sure what the backend of PowerApps does when dealing with these, but if we look at the documentation for these functions we can assume some kind of answer by making an educated guess:
Filter( Table, Formula1 [, Formula2, ... ] )
LookUp( Table, Formula [, ReductionFormula ] )
..So both of these functions are looking for a Formula, and my gut tells me that due to this, when searching by Display Name, a function will be able to discern the internal/static name from that.
So, getting back to the topic at hand,
Search( Table, SearchString, Column1 [, Column2, ... ] )
Description:
So we can see there that it outright states that column names must be static, so from the database side I would think it is only going to look for the internal/static name of the column, and they must be enclosed in double quotes.
So, I would think (going back to original question) that it would depend on whether you are using the Search function rather than Lookup/Filter as to whether it wants:
'Name Name' or Name_x0020_Name - which are usually interchangeable within Lookup()/Filter() due to it looking for a Formula (which I am Assuming can do intelligent lookups)
or
"Name_x0020_Name" - which will be looked for as an internal/static name by Search()
If either of you have any counter-examples of this where the preview feature is disabled please do share, as this whole reply is going on my assumptions on how PowerApps is viewing and dealing with internal/static/display names within these functions based on the documentation provided 🙂
Cheers,
User | Count |
---|---|
140 | |
137 | |
77 | |
77 | |
72 |
User | Count |
---|---|
222 | |
180 | |
68 | |
68 | |
58 |