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 / Searching SharePoint G...
Power Apps
Answered

Searching SharePoint Gallery List only returns "No item to display" in the PowerApps studio

(0) ShareShare
ReportReport
Posted on by 98

Hello,

I'm stuck on attempting to get search results to return "Not item to display" when there are no records in a SharePoint list that match a search query. I get "No item to display" in the studio when previewing the app, but so far, in the office.com PowerApps app, the Windows desktop PowerApps app, and iPhone PowerApps app, I get a "Getting your data ..." and I never get a "No item to display". Please see screenshots below:

cweaver_0-1596239906181.png

What I get in the studio.

cweaver_1-1596240138221.png

What I get everywhere else.

The search function does work on all partial and full matches as best I've been able to test, but this one has me stumped. What am I missing?

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @cweaver 
    Please share your code in the Item property of the Form.

     

     

  • cweaver Profile Picture
    98 on at

    Thanks for the quick response @mdevaney. Here's my Item property for the form:

    SitesGallery.Selected

    SitesGallery (on the left in the above pictures) is the name of my Gallery SharePoint list.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @cweaver 
    Using that code, you would have to click on a result found in the gallery for the form to work.

  • Verified answer
    cweaver Profile Picture
    98 on at

    That's interesting, @mdevaney; I'm guessing, perhaps, the intended operation of the Gallery-Form combo was to have the gallery on one screen and the form on a different screen, not combined on one screen as I have. I exactly copied the coding and structure of this particular portion of the FlooringEstimates sample app; however, that app has the gallery on one screen and the form on another, so I'd have to do more surgery on that sample app than I'd care to to test my theory. A workaround for my issue I seem to have stumbled on, but seems a bit crude, is to have a label positioned on top of where "Getting your data ..." appears and have it's Visible/Text properties tied to an If(Text(Title1)="" statement; Title1 being the item label in my SitesGallery. Any other thoughts on how to achieve what I'm after?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @cweaver :

    The combo of Gallery-Form can be in the same screen or in different screens.

    I guess the cause of the problem lies in the items property of the gallery or the datasource property of the form.If their data sources are different, it is easy to cause this error.

    Chould you show me:

    • The gallery's item's property
    • The from's DataSource proeprty
    • The form's item property

    Best Regards,

    Bof

  • WarrenBelz Profile Picture
    156,117 Most Valuable Professional on at

    @cweaver ,

    I will confirm @mdevaney 's thoughts - I have exactly what you have on a a couple of "dashboard" apps and as you cannot "pre-select" a gallery item, I use the following workaround

    Firstly, the Item of my form is 

    Filter(
     List,
     ID=vID
    )

    The OnSelect of the Gallery

    Set(vID,ThisItem.ID)

    Then the OnVisible of the screen

    Set(
     vID,
     First(GalleryName.AllItems).ID
    )

    so the first item in the gallery is displayed in the form when the screen is opened.

     

    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.

     

  • cweaver Profile Picture
    98 on at

    Hi @v-bofeng-msft

    I suspect the issue lies elsewhere as I am able to return partial and full matches when searching using the below fields. My post lies in response testing the app's behavior regarding the known lack of existence of a record; that being said, my parameters for:

    • The gallery's item's property
    SortByColumns(Search([@InstallationLocations],Tab3SearchBox.Text,"Account_x0020_Name","Shipping_x0020_City","Shipping_x0020_State","Industry"),"Account_x0020_Name",Ascending)
    • The from's DataSource property
    InstallationLocations
    • The form's item property
    Tab3SitesGallery.Selected

    The gallery name shown in this response is different from my response to @mdevaney as I have updated all item component names in my app.

     

  • cweaver Profile Picture
    98 on at

    @WarrenBelz 

    Your insights are on point, per usual. I tried implementing your code, however ran into a snag with the Form>Item code. Regardless of whether I use the InstallationLocations (SharePoint list source for the gallery), or the Tab3SitesGallery as list name, the formula is just not happy. It's interesting that you mention you have to force the first gallery item to appear with the screen's OnVisible as my original code didn't have to force any interactions between the screen's OnVisible and my gallery; my gallery's OnSelect is set to false and the first item in my gallery populates the form every time the screen is active. Below is what the user sees when the Sites tab loads; the blue rectangles are my quick confidentiality masks to a screengrab:

    cweaver_1-1596555749330.png

     

  • WarrenBelz Profile Picture
    156,117 Most Valuable Professional on at

    Hi @cweaver ,

    I re-visited another one of my apps that does this and there is a small difference.

    The gallery is a collection formed at App OnStart. I set vID (also at App OnStart to First(CollectionName).ID and (as noted before), it displays the first collection item in the Form.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard