web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fill text based on a d...
Power Apps
Unanswered

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
    875 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 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard