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 / Custom filter based on...
Power Apps
Answered

Custom filter based on a button

(0) ShareShare
ReportReport
Posted on by 361

I have a list of 45 questions, separated by numbering, but I need to show the user the questions separately by subject. So I have the column "Question" and the ID, what I thought is to insert a button, that when clicking the user could filter from ID 1 to 8 for example.
See the print, which will be better to understand: (Pergunta = Question)

Joaoandrebs_0-1685107146626.png

 

So I have this gallery to do this, I inserted a "next" button to go from ID 10 to 17, then from ID 19 to 24... and so on, I need a logic that I then adapt to the IDS that need.

Joaoandrebs_1-1685107376108.png

so I don't know if it's better to make some variables in the button to filter according to them or insert 1 button for each filter, etc. Thanks

I'm open for more suggestions! @BCBuizer any sugestion? 

Categories:
I have the same question (0)
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @Joaoandrebs 

     

    Add this to the button:

    //find a way to set the highest whole number for your questions, e.g.

    i have 15 records and the last one is question 2.5 the max whole = 2

    varlMaxNumber = 2

    UpdateContext({varlCounter: If(varlCounter < varlMaxNumber ,  varlCounter + 1)})

     

    Set the Gallery Items:

    Filter(colYourDataSource, StartsWith(question, Text(varlCounter)))

     

    Result

    rolling questions.gif

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard