cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

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

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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?

View solution in original post

9 REPLIES 9
Super User III
Super User III

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

 

 

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.

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

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?

View solution in original post

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

@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.

 

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.

 

@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

 

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.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,461)