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 / Reference to control i...
Power Apps
Unanswered

Reference to control inside a form return blank

(0) ShareShare
ReportReport
Posted on by 48

Hello,

I'm having a bizarre issue, and in fact might even be going crazy. I'm hoping this is a bug.

I have a form where a user uploads a file to a document library. This is done with Power Automate, which will then return the File ID for use in triggering a second automation.

 

What I need to do is get the filename of the uploaded file. I have a Form called Form1 and in the only datacard is an attachment control called AttachFile.

As you can see below, if I reference First(AttachFile.Attachments).Name, I can get the filename (this control only allows 1 attachment at a time) in a label called FileName.

 

However, I can't reference this outside of the Form1 form control. This isn't normal behaviour as I do this frequently, and have another app running that uses this same technique and I just checked it, and it works totally fine.

 

However, outside of the Form1 control, I have another text label called FileName_Text. If I set FileName_Text to First(AttachFile.Attachments).Name it comes up blank. Ditto if I use Value.

If I set it to FileName.Text, it also comes up blank, even though I can see that the text is there.

 

Why can't I reference controls inside a Form, outside of that form, but only on this app. The app I am working on is not new, and was created about 1 year ago (the app that is working was created about 3 years ago), and I'm simply adding a new function.

 

Here's a screenshot that shows my formula, and that it is not returning anything.Broken.PNG

For reference, here's the formula for FileName. It works because it's inside the Form1 control, I guess? This doesn't seem like usual behaviour.

not-broken.PNG

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,960 Moderator on at

    Hi @Sennematic 

     

    I agree, but I'd like to ask that you try the same formula in both spots, as you have a different one outside.


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Sennematic Profile Picture
    48 on at

    Thanks for the response. Although I've typed it differently (string interpolation in one), the formula is the same. I simply wanted to illustrate in one image that the formula, as well as referencing the control that IS working, both give me Blank as a result.

     

    However, I can confirm that even if I copy/paste the text of the working on to the non-working one, it still tells me the result is still Blank

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard