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 Apps
Answered

can't preview pdf

(0) ShareShare
ReportReport
Posted on by 20

please I have a power app with a gallery when I select an item I can't preview the pdf in pdf viewer because I am using the if statement in the items of gallery, however, it is showing if I am using the SharePoint list in items of gallery without the if condition .

please advice 

 

If(Dropdown2.Selected.Result="الكل",
Filter([@'outgoing-list'], StartsWith(descrption,SearchBox_1.Text) || StartsWith(entry_date,SearchBox_1.Text)),Filter([@'outgoing-list'], StartsWith(entry_date,SearchBox_1.Text) || StartsWith(descrption,SearchBox_1.Text)|| Dropdown2.Selected.Result in out_side.Value) )

 

 

First(TemplateGalleryList1_1.Selected.Attachments).Value

pdfnotpreview.png
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,440 Most Valuable Professional on at

    Hi @khaledfawzy ,

    You can get rid of the If statement like this

    With(
     {
     wList:
     Filter(
     [@'outgoing-list'], 
     StartsWith(descrption,SearchBox_1.Text) || 
     StartsWith(entry_date,SearchBox_1.Text)
     )
     },
     Filter(
     wList, 
     Dropdown2.Selected.Result <> "الكل" ||
     Dropdown2.Selected.Result in out_side.Value
     )
    )

    but that does not explain the lack of preview (if the record is there, it should show).

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • khaledfawzy Profile Picture
    20 on at

    Hi @WarrenBelz 

    As i said in my post the pdfviewer not showing attached file when i am using if statment.but i will change as you suggest and inform..

    Thanks 

     

  • khaledfawzy Profile Picture
    20 on at

    thank you @WarrenBelz 

    I did some modification and it is working fine 

     

    With(
    {
    wList:
    Filter(
    [@'outgoing-list'],
    StartsWith(descrption,SearchBox_1.Text) ||
    StartsWith(entry_date,SearchBox_1.Text)||
    StartsWith(out_no,SearchBox_1.Text)
    )
    },
    Filter(
    wList,
    If(Dropdown2.Selected.Result <> "الكل",Dropdown2.Selected.Result in out_side.Value,out_side.Value<>"الكل")
    )
    )

     

    appreciated 🌹

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard