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 / Control property X eva...
Power Apps
Answered

Control property X evaluates to Blank when used in a formula

(0) ShareShare
ReportReport
Posted on by 8

I have created a scrollable gallery, and am using headers (labels) outside the gallery to create an excel-like view for the user, using this idea: https://michalsacewicz.com/power-apps-horizontal-scroll-in-a-vertical-gallery-with-freeze-panes-effect/ 

 

It all works fine, when I scroll the gallery, the headers move with it etc. All good. However, I am now adding filtering to the gallery - so there's a search box where they can search the title field and some dropdowns. The search/filtering itself is working as expected. but the first time (and only the first time) that a filter is applied (whether by search text box or dropdown selection), the X property of the arrow at the end of the gallery (to select parent) evaluates to blank when used in a formula, even though it is still in the right place on the page. 

 

See screenshot: - on the right, the position x is showing 1316 (and it's in the right place on the screen), but when used in a formula, it shows blank. The formula used in the label is:   "EditIcon.X: '" & EditIcon_RTRGallery.X & "'"  

 

The effect of this is that the headers above these fields 'disappear' because their location is not 'less than' blank. 

 

Now, if I change the search field - either by removing a character, changing it completely, or adding a letter etc, then it suddenly works as expected, and in a formula EditIcon_RTRGallery.X will give a number instead of a blank. But I can't work out why it's doing it on the first time. I don't want users to have to mess around with the search box to get it to work. I've included a second screenshot that shows when I added more words, the headers reappear and the label at the bottom shows the actual X value instead of blank. If I then change it back to just the first word, the headers stay and everything is normal. 

 

Any ideas?!  

editicon_x.png
editicon_x2.jpg
Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Zantarel ,

     

    I have repro this issue but found a workaround:

    Do not use Self or Parent functions, just apply control names in formula bars.

     

    On your end, X of EditIcon_RTRGallery:

     

    Screen.Width - EditIcon_RTRGallery.Width -20

     

     

    Visible of ColumnName Labels:

     

    Label.X+Label.Width/3 < EditIcon_RTRGallery.X

     

     

    Please have a try and check if it works for you.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Zantarel Profile Picture
    8 on at

    Thank you!! I always thought using parent and self were better options, but as you say, that totally fixes the problem!! Thanks!!!!!

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 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard