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.
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)
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.
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.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional