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 / condition for Selected
Power Apps
Answered

condition for Selected

(0) ShareShare
ReportReport
Posted on by 8

Hi,

I am making a food ordering application and i am having some trouble. Here is the need,

 

All the employee should order food before every wednesday at 11:00 AM for next week and they are allowed to order food for all the upcoming weeks also.

they should not be allowed to order food for the same week and also after 11:00 on wednesday they are not allowed to order for next week. how can we achieve it.

I tried to make this condition

If(WeekNum(DatePicker1.SelectedDate) > WeekNum(Now()) && Weekday(DatePicker1.SelectedDate)<3,"order food","Please choose other date")

 

by this condition, for choosing next week it works perfect, and if try to limit weekday to choose less than 3, it do the same for all the weeks.

 

I hope my  question is clear

 

canteen ordering.JPG
Categories:
  • sgtsnacks64 Profile Picture
    322 Super User 2024 Season 1 on at

    Hi Ashik,

     

    Are you looking to limit people ordering beyond the next week?

     

    For example, I can order food for next week, but not the week after.

     

    Looking at your formula, this currently works for dates before today, and it works for the next week, but it also allows ordering between Sunday-Tuesday in subsequent weeks as well.

  • Ashik Profile Picture
    8 on at

    Hi,

     

    People can order for any days for upcoming weeks. Only restriction is that they must order Wednesday at 11.00 for next week. This is the deadline if people order food for next week.

     

    I don't have much experience in making power apps. If my formula is wrong please give suggestions.

     

  • Verified answer
    ansrikanth Profile Picture
    329 on at

    Hi @Ashik 

     

    I think the below formula should check all the boxes for you, check once if that helps.. 

    With(
    {
    today: Today(),
    selectedWeek:WeekNum(DatePicker1.SelectedDate),
    currentWeek:WeekNum(Today())},
    
    If((selectedWeek<=currentWeek) || (selectedWeek=currentWeek+1 && Weekday(today)>3) || (selectedWeek=currentWeek+1 && Weekday(today)=3 && Hour(Now())>11) ,"Invalid Date", "Good to Go")
    
    )

    Thank you

    -Srikanth

  • Ashik Profile Picture
    8 on at

    Hi Srikanth,

     

    I will check and let you know. Thank you for your support

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard