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 / To Pop Up only selecte...
Power Apps
Answered

To Pop Up only selected card screen by date of opening

(0) ShareShare
ReportReport
Posted on by 85

Hi Everyone,

 

I need help how to formula the navigation group of Standby list below base on criteria below:

1. When click the OnSelect button, i need 2 types of navigation

      a) This 4 cards screen and my colleague can review and scroll the list.

      b) Click additional button on the 4 cards screen and will show only group of standby this week (meaning base on today's date) and change the background color

 

Note: Date Start and Date End is predefined in sharepoint list, Week n Month as well. Can we formulate date range 1st? Then Today date refer on what of the date range.

Let me know if you want info of the card property/advance

My Gallery name is: StandbyList2022 

asuhaimi_0-1645265290675.png

Regards

asuhaimi

 

below only

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

    hi @asuhaimi let me see if i get this right 😉 

     

    You are ok with part a - so i will not respond to that in case i missed something.

    part b you need to get the start of the week and compare that with the Date Start value. If a date range is within the start of this week, show it and change the back ground.

     

    Ok you need to get he start date of this week first, here it is

     

    DateAdd(
     Now(),
     -(Weekday(
     Now(),
     StartOfWeek.MondayZero
     )),
     Days
    )

     

     

    If you add this to a filter you get the following effect

    Peek 2022-02-19 19-41.gif

    To do this

    Add a button and set the

    OnSelect  = UpdateContext({FilterTheList:!FilterTheList})

    Set the items of the gallery to

     

    If(
     FilterTheList,
     Filter(
     yourSharePointSource,
     With(
     {
     _StartOfWeek: DateAdd(
     Now(),
     -(Weekday(
     Now(),
     StartOfWeek.MondayZero
     )),
     Days
     )
     },
     yourDateStart >= _StartOfWeek && yourDateStart < _StartOfWeek + 6
     )
     ),
     yourSharePointSource
    )

     

    Set the Gallery's TemplateFill =  If(FilterTheList, LimeGreen, RGBA(0, 0, 0, 0))

     

    That's it

    Yo can set the Button's Text = If(FilterTheList,"All","Filtered List")

     

    Hope this helps,

    R

     

  • asuhaimi Profile Picture
    85 on at

    Hi @rubin_boer 

     

    Thanks for your response..

    I was trying to follow your steps but a bit confuse.

    Do I need key in the date and I need to create a collection..?

    Really appreciate if you can elaborates  the steps.

     

    Regards

    asuhaimi

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    sure @asuhaimi 

     

    Ps I will do the comparison with WeekNum and not the startOfWeek variable as previously.

     

    Please consider the following:

    • Datasource = yourDataSource {dateStart, dateEnd, weekNumber,etc...}
    • Gallery = StandbyList2022
    • varWeekNumber
    • Button = btnShowCurrentWeek

    Add the following:

    App.Onstart

    //set the current week number to a variable you will use to evaluate which items to show

    Set(varWeekNumber,WeekNum(Today()))

     

    StandBy Screen (4 cards screen)

    // set the local variable to filter your list when selected, by default it will be false

    btnShowCurrentWeek's OnSelect = UpdateContext({FilterTheList:!FilterTheList})

    //show the function the button will perform to the user,

    //when not clicked (FilterTheList will be false) it will show all items, clicking the button will then "Filter List"

    btnShowCurrentWeek's Text = If(FilterTheList,"All","Filter List")

    //filter the gallery based on whether the button was clicked

    StandbyList2022's Items = If(FilterTheList,Filter(yourDataSource, weekNumber = varWeekNumber),yourDataSource)

    //when the user click to filter (FilterTheList is true) then change the background of the template

    StandbyList2022's TemplateFill =  If(FilterTheList, LimeGreen, RGBA(0, 0, 0, 0))

     

    Hope this will help,

    R

     

  • asuhaimi Profile Picture
    85 on at

    Hi @rubin_boer ,

     

    Tqvm for effort and time..

    Below what I get.. Am I missing something..? I still not get understand  the relationship and reference between Week number in Gallery tie to FilterList.

    asuhaimi_0-1645341014039.pngasuhaimi_1-1645341148975.png

    asuhaimi_3-1645341516656.png

    asuhaimi_2-1645341262745.png

    asuhaimi_4-1645341615742.pngasuhaimi_5-1645341719584.pngasuhaimi_6-1645341852246.png

     

    Regards

    asuhaimi

     

     

     

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @asuhaimi 

     

    TemplateFill Errror

    TemplateFill =TemplateFill =  If(FilterTheList, LimeGreen, RGBA(0, 0, 0, 0))  

    TemplateFill =  If(FilterTheList, LimeGreen, RGBA(0, 0, 0, 0))

     

    Name Error

    In your datasource you have a column that captures the week number change the weekNumber below to your columns week number 

    StandbyList2022's Items = If(FilterTheList,Filter(yourDataSource, weekNumber = varWeekNumber),yourDataSource)

    Below you have WEEK 1, you need to compare that value with varWeekNumber. I assumed you have the week numbers as an integer, if it is stored as string; filter you datasource as per your prefix ("WEEK ") and number

    StandbyList2022's Items = If(FilterTheList,Filter(yourDataSource, weekNumber = "WEEK " & varWeekNumber),yourDataSource)

    rubin_boer_0-1645342639729.png

     

    give that a try and let me know

  • asuhaimi Profile Picture
    85 on at

    Hi @rubin_boer 

     

    Below the result.. fyi.. WEEK is Multi choice. Do we need put in Value?

     

    asuhaimi_0-1645343436025.png

     

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    ok @asuhaimi , i assume templatefill is sorted. 

     

    you van evaluate the choice as well, by adding the Value yes.

    Items = If(FilterTheList,Filter(yourDataSource, weekNumber.Value = "WEEK " & varWeekNumber),yourDataSource)

  • asuhaimi Profile Picture
    85 on at

    Hi @rubin_boer 

     

    Still error occured.

     

    asuhaimi_0-1645344925283.png

     

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @asuhaimi what is the name of the choice column keeping the week number

  • asuhaimi Profile Picture
    85 on at

    Hi @rubin_boer 

     

    Sorry for typo error.. the WEEK is "WEEK 2022" and below my my sharpoint list data source. We else or info I missing out?

    asuhaimi_0-1645346047919.png

    But I've change the week column name.

    asuhaimi_1-1645346138178.png

     

     

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 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard