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 / Fill text based on a d...
Power Apps
Answered

Fill text based on a date choice.

(0) ShareShare
ReportReport
Posted on by 39

Hello

 

Im trying to create a formula to fill a textbox on a gallery based on a date field, something like

 

If(Thisitem.Date > todaydate ; "Valid", today.date+30 days, "Waiting, "Invalid")

 

Basically if the due date is bigger than today is valid, if is less but is within 30 days it still valid but waiting, and after that is invalid...

 

Is it possible?

Categories:
I have the same question (0)
  • Verified answer
    RogierE Profile Picture
    879 Moderator on at

    If(ThisItem.Date > Today(), "Valid", If (ThisItem.Date > DateAdd(Today(), 30, Days), "Waiting, "Invalid"))

     

    Please like the reply and/or accept it as the solution if the answer is what you were looking for.

  • BrunoVieira3 Profile Picture
    39 on at

    Had to remove the "days" for it to work on Brazil powerapps.

  • BrunoVieira3 Profile Picture
    39 on at

    Sorry, the Waiting did not work...

  • BrunoVieira3 Profile Picture
    39 on at

    On my code it got like this:

     

    If(ThisItem.VENCIMENTO > Today(); "VÁLIDO"; If(ThisItem.VENCIMENTO > DateAdd(Today();30;TimeUnit.Days); "EM VALIDAÇÃO"; "INVÁLIDO"))
     
    "VALIDO" AND "INVALIDO" WORKS, "EM VALIDAÇÃO" SHOWS BLANK
  • Verified answer
    jrletner Profile Picture
    720 Moderator on at

    @BrunoVieira3 this should handle the waiting. Also, need the minus "-" sign in front of the 30. That way it goes back 30 days prior.

     

     

     

    If(
     DateValue(ThisItem.Date) > Today(),
     "Valid",
     If(
     DateValue(ThisItem.Date) <= Today() && DateValue(ThisItem.Date) >= DateAdd(
     Today(),
     -30,
     TimeUnit.Days
     ),
     "Waiting",
     "Invalid"
     )
    )

     

     

     

    jrletner_1-1711138534291.png


    If my post helped you solve your issue, please click 'Accept as solution.' This will assist others in finding the solution more easily and will also close the item. If you found the content useful in other ways, feel free to give it 'Thumbs Up.'

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard