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

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':

App interface without any filters or search applied.App interface without any filters or search applied.

 

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

Results returned from the collectionResults returned from the collection

 

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

No errors in formulaNo errors in formula

 

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

Formula ErrorFormula 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
Highlighted
Advocate III
Advocate III

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
Highlighted
Advocate III
Advocate III

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
secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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