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 / Carry forward date of ...
Power Apps
Answered

Carry forward date of request and don't allow it to be changed in edit mode

(0) ShareShare
ReportReport
Posted on by 84

This seems like it should be easy but I'm struggling.  I have a form that I created from a SharePoint list. It has a new form and an edit form.

 

In the new mode there is a field called Date of Request: I currently have that defaulting to today's date or Today ()

 

In the edit form the field is set the same way but what I actually need is for the date from the "new form" to carry forward to the edit form and not be editable.  When I try Parent.default, it displays 12/31/2001. 

 

Is there a way to do this?

Categories:
I have the same question (0)
  • K-A-R-L Profile Picture
    715 on at

    Hi @Christy_Roach,

    You can use the Set() function then call the variable on your edit form.

    Cheers

  • Christy_Roach Profile Picture
    84 on at

    Thanks for the help. I'm sorry if I'm being slow.  The variable on the edit form is " Date of Request".  I've tried multiple variations.  Would it be Set ('date of request)?

  • K-A-R-L Profile Picture
    715 on at

    Just to be sure we're on the same page.

     

    Currently your Date of Request field default date is today() (e.g 16/05/19)

     

    If a user enters a new date (e.g 23/05/19) and save it. You want the 23/05/19 field to show on the edit form and disable editing?


    Note: Set() function sytax:

    Set( VariableName, Value )

    • VariableName - Required. The name of a global variable to create or update.
    • Value - Required. The value to assign to the context variable.


    To achieve this:

    *New Screen*
    Change Date of Request field default date:

    If(EditPressed = true, DateSelected, Today())


    *Detail Screen*
    OnVisible property: Set(EditPressed, false)

    Add this on the Edit Icon/Button OnSelect Property :

    Set(DateSelected, DataCardValue.Text);

    Set(EditPressed, true)


    *Edit Screen*

    DisplayMode Property: change the parent.Displaymode to Disabled

    Cheers

     

     

     

     

  • v-yutliu-msft Profile Picture
    on at

    Hi @Christy_Roach ,

    Do you want the Date of Request filed uneditable and displaying today's date by default in edit form?

    Firstly, unlock the card of Date of Request filed.

    Secondly, set the card of Date of Request filed's DisplayMode: DisplayMode.View

    Thirdly, set the date picker's DefaultDate: Today()

     

    5162_LI.jpg

     

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • Christy_Roach Profile Picture
    84 on at

    Actually, no.  If the user enters 5/23/19 on the new form, I want that same date to be carried forward in the edit form and not be changeable.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Christy_Roach 

    Can you describe more about what you mean by "carried forward"?

    Are you stating that the user will create a record (in the "New" form) and then be taken to the Edit form and you want the date to "carry over" to that form?

    Or are you stating that a record be entered in the New form and that at some point in time you will edit that record and you want the date to not be changeable and it is not correct based on what you have in the record?

  • Christy_Roach Profile Picture
    84 on at

    Sorry - so this is a marketing request platform.  Anyone in the company can initiate the "new form".  In the new form, I have the date defaulting to the date that the person fills out the form.  So let's say that the initial date of request is today, 5/16/19.   A message is then sent to a person in marketing who needs to vet the project.  They will go into the edit version of the form.  It's all tied to a sharepoint list - so they would go to the list and click ont he item.   So when they go into the edit version of the form,  I want the date that the original requester filled out to show (5/16/19) and I don't want the marketing person to be able to change that date.  The request date should always be the original request date.

     

    Does that help?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Christy_Roach 

    Perfect!

    So, you want to change the (unlock first) the DisplayMode of the DataCard that has the Date column you are talking about in it.  Then set the DisplayMode to Disable

    This is based on the assumption that the Edit form is different than the new entry form.

    IF it is not...then, change your DisplayMode property to If(yourFormName.Mode=New, Edit, Disable)

    This will allow entry when it is a new form and disabled when it is not.

    BUT...If I read everything you have posted, it seems you never want this field to be edited.  If a New form is created, then it will have Today() in it - no editing allowed.  

    If that is correct, then jsut stick with the Disable in the DisplayMode

     

    If you are having issues with the date not being what you expect in it, then change the Default property of your DataCard to the following:

      If(yourFormName.Mode = New, Today(), ThisItem.yourDataColumnName)

     

    I hope this is clear and helpful.

  • K-A-R-L Profile Picture
    715 on at

    @Christy_Roach ,

    You should probaly set a trigger on the Screen where the person in marketing selects the project that needs vetting then use the trigger to create a conditional formatting of your "Date of Request" field.

    e.g. 

    *Detail Screen* ( Screen where the person in marketing selects the project)

    If you have a button/icon that navigates to the Edit Screen then add this to the OnSelect Property:

     

    Set(EditPressed, true)

     

    *Edit Form* or *New Form*

    Set the "Date of Request" field's DisplayMode Property:

    If(EditPressed = true, Disabled, Active)


    Cheers

  • Christy_Roach Profile Picture
    84 on at

    Thank you so much Randy for your help.  So it won't always be the same day when that they enter the form and someone edits it.  I tried just the Disabled in Display Mode but it shows the current date when you go into the error form.

     

    Let me clarify - I'm doing this in the edit form.  So the original form was completed on 5/8 and I went back in today in edit mode and it changed the date to 5/17 plus I could edit it.

     

    So then I tried the last that you suggested.  Mine reads If(ProjectReqNew.Mode = New, Today(), ThisItem.'Requested due date for final deliverable')   - I'm getting an invalid argument type.

     

    I'm getting myself so turned around.  I have 2 forms.  ProjectReqNew and the other is ProjectReqEdit

     

    I'm trying to do this on the edit form. 

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard