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 / additional Filter on m...
Power Apps
Unanswered

additional Filter on my gallery

(0) ShareShare
ReportReport
Posted on by

I am hoping increase this formula:

 

SortByColumns(Search(FAQ,TextInput1_1.Text,"Answer","{Name}"),"Modified",Descending)

 

I works great but i would also like it to filter the gallery items so that it wont show records that have no text in the 'Answer' Column in sharepoint.

 

The reason being i want to answer the questions being asked before they are then dispayed in my app.

 

Thanks in advance

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @BenGillard,

    Your previous formula probably gives a delegation warning since Search() is not delegatable in Sharepoint.  The following should work but will also give a delegation warning.

    SortByColumns(Search(Filter(FAQ,!IsBlank("Answers")),TextInput1_1.Text,"{Name}"),"Modified",Descending)

    This formula filters out the blank values from the Answers column before searching the list. 

    If you would like to get rid of the delegation warnings, create a collection on the FAQ list and use that instead of FAQ in the formula.  You do that by putting the following formula in the OnVisible property of the Screen holding  your gallery.

    ClearCollect(colFAQ,FAQ)

    and replacing the FAQ in the 1st formula with colFAQ

  • BenGillard Profile Picture
    on at

    Thank you for your help, I have tried to do as you suggested to remove the delegation warning. I now have this formula:

     

    SortByColumns(Search(Filter(Collection2,!IsBlank("answer")),TextInput1_1.Text,"{Name}"),"Modified",Descending)

     

    I seem to be getting no results in the gallery at all now. Am i missing something.

     

    Thanks in advance

  • BenGillard Profile Picture
    on at

    I have just saved and reloaded the app, and now the data is showing in the gallery however even with the above formula i am still seeing the entries where the "Answer" field is blank as well as all the others.

     

    Any help would be great thanks

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @BenGillard,

    You can pre-filter the collection when you create it.  Again on the OnVisible property of the Screen containing the gallery: 

    ClearCollect(
     Collection2,
     Filter(
     Faq,
     !IsBlank(answer)
     )
    )

    In your Gallery 

    SortByColumns(Search(Collection2,TextInput1_1.Text,"Name"),"Modified",Descending)
  • BenGillard Profile Picture
    on at

    Thanks for this, i have done as you explained, which has filtered the information well.


    @Drrickryp wrote:

    Hi @BenGillard,

    You can pre-filter the collection when you create it.  Again on the OnVisible property of the Screen containing the gallery: 

    ClearCollect(
     Collection2,
     Filter(
     Faq,
     !IsBlank(answer)
     )
    )

    In your Gallery 

    SortByColumns(Search(Collection2,TextInput1_1.Text,"Name"),"Modified",Descending)

     

    I am however still getting a delgation warning on the below

     

    ClearCollect(FAQCol,Filter(FAQ,!IsBlank(Answer)))

     

    possibly down to the !IsBlank function? Let me know your thoughts.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    How many items are there in your FAQ list and how many are likely to be blank at any time?
  • BenGillard Profile Picture
    on at

    Very few at the moment as its still only test data. I am unsure how large the dataset will grow when the app starts being used however, and could grow quite quickly.

    I have an option for questions to be asked which then populates a sp list, then when the question has been aswered i want it to be displayed, hence the need for the filter.

    Hope this helps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard