web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Vertical Galler...
Power Apps
Unanswered

Filter Vertical Gallery with button press on another screen

(0) ShareShare
ReportReport
Posted on by 134

Hello,

 

I'm new to power apps and need a little help.

 

I have a SharePoint list that has a list of objectives. The objectives are stored in the list as:

 

Title       Objective Title

1.1         Objective Name 1.1

1.2         Objective Name 1.2

1.3         Objective Name 1.3

2.1         etc.

2.2

2.3

etc.

 

I have the list connected to a vertical gallery on one of my screens. On the main page I need to be able to press a button called "Objective 1" that takes me to the next screen. When I get to the next screen I would like to see only the items associated with objective 1 from my list to display in the vertical gallery.

 

I've seen posts about needing to create a variable but haven't had any luck getting it to work. Any help would be greatly appreciated. Thank you.

Categories:
I have the same question (0)
  • slerch Profile Picture
    59 on at

    I'll make a couple assumptions and you can correct me if I'm wrong. You need a button for each OBjectiveand 1.1, 1.2, 1.3, ..., 1.n are a subset of Objective 1.

     

    I would have a second gallery that where the items are:

    Distinct(
     SpListName,
     First(
     Split(
     Title,
     "."
     )
     ).Result
    )

    This will give you the distinct values that are before the "." in Title.

     

    Then have button in the gallery has the OnSelect value of:

    Set(numObjective, ThisItem.Result);

     

    On the next page the Vertical Gallery will have the items:

    Filter(
     SpListName,
     First(
     Split(
     Title,
     "."
     )
     ).Result = numObjective
    )

    This should give you the items that you're after.

     

    That being said, I would personally set this up with 2 SharePoint Lists. The first one is Objectives and the second one would be the sub-objectives.

  • ChrisS81 Profile Picture
    134 on at

    Thanks for the reply @slerch .

     

    My example above for the Objective Title isn't how it's displayed in my list. I should've been more clear. Sorry about that.

     

    The list is more like:

     

    Topic  Title       Objective Title

    1         1.1         Objective Name 1.1

    1         1.2         Objective Name 1.2

    1         1.3         Objective Name 1.3

    2         2.1         etc.

    2        2.2

    2        2.3

     

    I need to filter so that if I click on the "Topic 1" button, it filters the gallery on the next page to display:

    Topic  Title       Objective Title

    1         1.1         Objective Name 1.1

    1         1.2         Objective Name 1.2

    1         1.3         Objective Name 1.3

     

    Hopefully this clarifies what I'm trying to do.

     

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ChrisS81 

    Use a variable to control the Items property of the data table on a target screen like scrDatatable.

    For example in button 1:Set(itms, Filter(splist, Topic=1) ;Navigate(scrDatatable)

    for button 2: Set(itms, Filter(splist, Topic=2); Navigate(scrDatatable),  etc. 

    For an unfiltered list, you could have a button "Unfiltered": Set(itms, splist); Navigate(scrDatatable)
    Make the Items property of the data table: Sort(itms, Title, Ascending)

     

  • ChrisS81 Profile Picture
    134 on at

    Thanks @Drrickryp 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard