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 / First(ThisItem.Attachm...
Power Apps
Answered

First(ThisItem.Attachments).Value does not work with condition query

(0) ShareShare
ReportReport
Posted on by 29

Hi,

My app has a Gallery in which there is an image to display First(ThisItem.Attachments).Value

 

Using If condition, then Image is not displayed

Condition Query.JPG

 

Removed If condition, then Image is displayed

Removed Condition Query.JPG

 

Much appreciated your help if anyone has idea of this issue

Categories:
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello @thangdang, Do you have multiple records with ID=84? and If so, is there any record without an attachment?

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • fuzzy_fuzz Profile Picture
    229 on at

    Hi, @thangdang 

    I've encountered the same issue than you. ThisItem.Attachments seems to not work inside galleries on my end. 

     

  • thangdang Profile Picture
    29 on at

    Hi @AhmedSalih , it's single record with ID=84

  • thangdang Profile Picture
    29 on at

    Hi @fuzzy_fuzz , it works when there is no "If condition"

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @thangdang, just to debug this, try to use 1=1 instead of the true condition.

  • thangdang Profile Picture
    29 on at

    @AhmedSalih result is the same

    Capture.JPG

  • Verified answer
    thangdang Profile Picture
    29 on at

    Thanks to this post which is similar issue Solved: Attachment picture in a gallery failed to open sin... - Power Platform Community (microsoft.com)

    I have resolved this issue by changing authoring version

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard