cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cfebvre
Level 8

Filtered Gallery Formula works in Preview, breaks after save an close

 

Hi All,

 

I have a Filtered Gallery that first uses a Sharepoint List as the Data Source, and then Switches to a Collection when users Select a Search Field I have set up.

This enables users to Filter a Sharepoint List (which is then collected in the collection), and then Search for specific text and return results from the collection (avoiding delegation problems).

The formula works perfectly, with no errors, in preview mode. The results returned are correct.

However, when I save/publish and close the app, then then reopen it, the formula is suddenly broken.

The main culprit seems to be my 'TextSearch' identifier. (I receive the "Name isn't valid. The identifier isn't recognized." message.

What I can't figure out, is that this identifier is recognized when I first enter the formula, and I can run the app in preview mode and it works, but then when I close, it's suddenly broken when I reopen it).

For reference, the entire formula is:

If(Len(SearchFrame.Text) = 0,
SortByColumns(Filter(Acta, 
PublicationDropDown.SelectedText.Value = "All Publications" 
Or PublicationDropDown.SelectedText.Value = Publication.Value,
YearDropDown.SelectedText.Value = "All Years" 
Or YearDropDown.SelectedText.Value = Year.Value,
WeekDropDown.SelectedText.Value = "All Weeks" 
Or WeekDropDown.SelectedText.Value = HiddenWeekNo,
SubEditDropDown.SelectedText.Value = "All Statuses" 
Or SubEditDropDown.SelectedText.Value = HiddenSubEditStatus,
PublishedStatusDropDown.SelectedText.Value = "All Statuses" 
Or PublishedStatusDropDown.SelectedText.Value = PublishedStatus.Value 
),"HiddenPageNo", Ascending, "HiddenStoryNo", Ascending),
Filter(SearchList, SearchFrame.Text in TextSearch))

 

Here is the preview of the app interface without search or filters applied, returning results from the data source 'Acta':

Annotation 2020-01-09 110234.jpgApp interface without any filters or search applied.

 

Here's a preview of the app correctly returning filtered results from the collection:

Annotation 2020-01-09 112446.jpgResults returned from the collection

 

Here is the formula with no errors, when I first enter it:

Annotation 2020-01-09 112323.jpgNo errors in formula

 

And finally, here is the formula error after I reopen the app:

Annotation 2020-01-09 112124.jpgFormula Error

 

Additionally, in previous iterations of the app, prior to setting up the collection, the filters on the data source worked perfectly. It's only since I introduced the collection that this has occurred.

 

Any help or advice anyone can provide would be great.

 

Kind Regards,

 

Chris.

1 ACCEPTED SOLUTION

Accepted Solutions
cfebvre
Level 8

Re: Filtered Gallery Formula works in Preview, breaks after save an close

I have worked out a solution.

 

I needed to create two separate galleries.

One Gallery has the Sharepoint List Data Source.

The other gallery has the Collection.

Selecting the search field turns the visibility of the SharePoint Gallery off, and turns on the Collection Gallery.

Then when you type text into the search field, it finds any entries in the collection containing that text.

I then have a 'Clear' button that resets the galleries back to the default SharePoint List gallery.

 

So now I can refine the whole Data Source from Sharepoint, and then use Powerapps collection to search for specific text using the in operator.

Take that, delegation warning! 😄

View solution in original post

1 REPLY 1
cfebvre
Level 8

Re: Filtered Gallery Formula works in Preview, breaks after save an close

I have worked out a solution.

 

I needed to create two separate galleries.

One Gallery has the Sharepoint List Data Source.

The other gallery has the Collection.

Selecting the search field turns the visibility of the SharePoint Gallery off, and turns on the Collection Gallery.

Then when you type text into the search field, it finds any entries in the collection containing that text.

I then have a 'Clear' button that resets the galleries back to the default SharePoint List gallery.

 

So now I can refine the whole Data Source from Sharepoint, and then use Powerapps collection to search for specific text using the in operator.

Take that, delegation warning! 😄

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,197)