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 / how to create button f...
Power Apps
Unanswered

how to create button filter

(0) ShareShare
ReportReport
Posted on by 89

justlearner1_0-1637323535189.png

i created variable context for each button , now i want to add one more button that should skip completed status details and show reaminings records in gallery

any idea?

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

    Hi @justlearner1 

     

    Filter('SPList',
    IsBlank(varStatus) || varStatus = "All" || Status.Value = varStatus
    )


    Thanks,
    Stalin - Learn To Illuminate

  • Ungarala1 Profile Picture
    184 on at

    Hi please see the image, I need one more button that should display all status details by skipping completed status... I don't how to write context variable in it.

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Ungarala1 

     

    Set the onselect property of the button to

    UpdateContext({varStatus:"SkipCompleted"})

     

    With (
     {item: 'SPList'},
     If(
     varStatus = "SkipCompleted",
     Filter(
     item,
     Status.Value <> "Completed"
     ),
     Filter(
     item,
     IsBlank(varStatus) || varStatus = "All" || Status.Value = varStatus
     )
     )
    )

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @justlearner1 


    Please let us know if anything needs on your post. We can help with this.

    Please mark the post as Solved If I have answered your question.
    Please give it a Thumbs Up if you find the suggestion helpful

    Thanks,
    Stalin - Learn To Illuminate

  • justlearner1 Profile Picture
    89 on at

    this is my existing code, after inserting your code it is not working

     

    SortByColumns(
    Filter(
    'SPTracker',

    Program.Value = varproject || IsBlank(varproject) || varproject = "All",
    Status.Value = varStatus || IsBlank(varStatus) ||varStatus="All",
    'Task Type'.Value=vartask||IsBlank(vartask)||vartask="All",
    StartsWith('Task Number',searchbox1.Text)

    ),
    "ID",
    Descending
    )

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @justlearner1 

     

    Please try this

     

    SortByColumns(
    Filter(
    'SPTracker',
    IsBlank(varproject) || varproject = "All" || Program.Value = varproject,
    IsBlank(varStatus) || varStatus="All" || Status.Value = varStatus,
    IsBlank(vartask) || vartask="All" || 'Task Type'.Value=vartask,
    StartsWith('Task Number',searchbox1.Text)
    ),
    "ID",
    Descending
    )

     


    Thanks,
    Stalin - Learn To Illuminate

  • justlearner1 Profile Picture
    89 on at

    where i need to add this 

    varStatus = "SkipCompleted",

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @justlearner1 

     

    Please try this with Skip completed one.

    SortByColumns(
     With(
     {Item: 'SPTracker'},
     Filter(
     Item,
     IsBlank(varStatus) || varStatus = "All" || (If(
     varStatus = "SkipCompleted",Status.Value <> "Completed",
     Status.Value = varStatus
     )),
    IsBlank(varproject) || varproject = "All" || Program.Value = varproject,
    IsBlank(vartask) || vartask="All" || 'Task Type'.Value=vartask,
     StartsWith(
     'Task Number',
     searchbox1.Text
     )
     )
     ),
     "ID",
     Descending
    )

     
    Thanks,
    Stalin - Learn To Illuminate

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard