cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filter Gallery from SharePoint list (choice field) with buttons

I am trying to filter my galley to only show expense reports by status. Open,Approved and Rejected are the choice fields that I am attempting to use from my SP list and link to a button to sort. I am trying to do something similar to the template expense report app. Something is not wired correctly and I could use some help. 

 

 

Variable: Need help

Set(varStatus, "Open")



Galley Items:

SortByColumns(Filter([@EXPR],CreatorEmail=varUser.Email,StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))


Status(choice field):Approved,Open, Rejected
Concat(ThisItem.'status expense '.Value, Concatenate(Text(Value),""))

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Filter Gallery from SharePoint list (choice field) with buttons

@KHenderson 

Begin my making a Choices field in your SharePoint list called 'Status' having the following options:

Open, Approved, Rejected

 

Then place a new ComboBox in the canvas app with this Items property

Choices(your_sharepoint_list.your_column)

 

Finally create a gallery and use this code in the Items property

Filter(
    your_sharepoint_list,
    CreatorEmail=varUser.Email,
    Status = ComboBox_Status.Selected
)

 

Assuming the rest of your function works you can place it like this.

ShowColumns(
    Filter(
        your_sharepoint_list,
        CreatorEmail=varUser.Email,
        Status = ComboBox_Status.Selected
    ),
    "Title",
    If(SortDescending1, Descending, Ascending)
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

1 REPLY 1
Highlighted
Super User
Super User

Re: Filter Gallery from SharePoint list (choice field) with buttons

@KHenderson 

Begin my making a Choices field in your SharePoint list called 'Status' having the following options:

Open, Approved, Rejected

 

Then place a new ComboBox in the canvas app with this Items property

Choices(your_sharepoint_list.your_column)

 

Finally create a gallery and use this code in the Items property

Filter(
    your_sharepoint_list,
    CreatorEmail=varUser.Email,
    Status = ComboBox_Status.Selected
)

 

Assuming the rest of your function works you can place it like this.

ShowColumns(
    Filter(
        your_sharepoint_list,
        CreatorEmail=varUser.Email,
        Status = ComboBox_Status.Selected
    ),
    "Title",
    If(SortDescending1, Descending, Ascending)
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

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 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,990)