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 / change number in a tex...
Power Apps
Answered

change number in a textbox based on arrow right or left

(0) ShareShare
ReportReport
Posted on by 103

Hi,

Im trying go get a gallery listing objects based on a week in a textbox.

Default when loadin that page it should start with the current week.

If pressing arrow right I would increase to 21, then 22 if pressing again. Same way backwards. if pressing arrow left it should remove one number.

 

If the default value is ISOWeekNum(Today()) do I homehow capture this in an if else statement or what would be a good approach?

if left arrow then decrease on number, if right arrow then add a number. else display current week?

 

And obviously the gallery needs to be linked to this textbox to reflect the new week that has been selected.

 

 

fiddlerx_0-1684359049174.png

 

Categories:
  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at
    ////TextLabel Default
    
    If(IsBlank(addMe),ISOWeekNum(Today()),addMe)
    //right arrow
    If(IsBlank(addMe), UpdateContext({addMe:ISOWeekNum(Today())+1}), UpdateContext({addMe:addMe+1}))

     

    //left arrow
    If(IsBlank(addMe), UpdateContext({addMe:ISOWeekNum(Today())-1}), UpdateContext({addMe:addMe-1}))
  • fiddlerx Profile Picture
    103 on at

    Thanks @TheRobRush !

    Do I need to convert that text/number to something to get the gallery to be displayed?

     

    Using: Filter(Table1, 'Week' = selectedWeek.Text) now but its all gray.

  • fiddlerx Profile Picture
    103 on at

    I actually tried Filter(Table1, 'Week' = selectedWeek.Text, 2) and it worked.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    is selectedWeek.Text this?

     

    TheRobRush_0-1684361552243.pngIf yes I would probably just make it

    If(IsBlank(addMe), ISOWeekNum(Today()), addMe)

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard