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 a DataValue dat...
Power Apps
Answered

Change a DataValue date based on another date from the same card

(0) ShareShare
ReportReport
Posted on by 4

Hi

I've searched and found some similar issues on the form/card for changing a value based on another but i can't get mine working. Im wondering if its to do with that im using dates?

 

I have a DataValue in my card with requires a submission date to be selected

pmarkley_0-1687872376423.png

Based on that selected value, i need my other date to auto add 7 days (or 5 working days) as default

pmarkley_1-1687872436766.png

I've tried the OnChange and the OnSubmit with the following formula but it doesnt work:

 

DataValueSLA.SelectedDate = DateAdd(DataValueSubmittedDate.SelectedDate,7,Days)

 

The formula returns not errors but i dont get the results i require. Ideally everytime the SubmittedDate is changed, i need the SLA date to auto adjust by the 5 working days (7 days)

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @pmarkley ,

     

    Could you add this to the Default Date property?

     

     

    DateAdd(DataValueSLA.SelectedDate,5,TimeUnit.Days)

     

     

    Note copying and pasting syntax from elsewhere will often not work because the enumeration is hidden. You will now need to explicitly reference the function. In your example, "TimeUnit." needs to be preceded by Days.

     

     

    DataValueSLA.SelectedDate = DateAdd(DataValueSubmittedDate.SelectedDate,7,TimeUnit.Days)

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • pmarkley Profile Picture
    4 on at

    That does work thank you. I had all the right code, just in the wrong places.. 

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard