Skip to main content

Notifications

Power Apps - Building 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:
  • Verified answer
    K-A-R-L Profile Picture
    K-A-R-L 715 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    Hi @Christy_Roach


    Please see the images attached below:


    *New Form*
    If you click the (+) icon it navigate to the edit screen which user can select the date (the default date is today())

    New Form New Entry Icon.jpg

    *EditForm*
    As you can see the date's default is today()
    Date DisplayMode can be edited only if (+) is clicked
    New Form New Date Entry.jpg

    *New Form*

    Once an entry is added and when the marketing selects the project (right Chevron Icon) it will navigate to the edit screen that carries the selected date of the project (as seen on the next image)
    New Form Edit Icon.jpg

    *Edit Form*
    Display Mode is Disabled since the item is being edited.
    Edit Screen Date DisplayMode.jpg


    *Edit Form*
    Selected Date is carried over.
    Edit Screen Default Date.jpg 

    Cheers

  • Verified answer
    RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    @Christy_Roach 

    Okay, then back to my previous response...

    In the New Form, set the Default property of the DataCard for the entry date to be Today()

    Then in the Edit form, set the DisplayMode of the DataCard for the entry date to be Disabled

     

  • Christy_Roach Profile Picture
    Christy_Roach 84 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    Hi Randy - yes, all of htat is correct. 

     

    We have a "New" form - the date is defaulting to today's date.  It can be changed but doubtful that it would be.

     

    And then we have the "Edit" form and we do not want to be editable but only be displayed as the original date when the "new " form was created. 

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    @Christy_Roach 

    So, let's see if we can unturn you...

    From what I am hearing, you have a "New" form - there you want the date to automatically be entered as todays date (editable or not??).

    You have an Edit form - there you do not want the date to be edited, only displayed as the original date when created.

     

    Let me know if that is right and I can suggest from there.

  • Christy_Roach Profile Picture
    Christy_Roach 84 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    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. 

  • K-A-R-L Profile Picture
    K-A-R-L 715 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    @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

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    @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.

  • Christy_Roach Profile Picture
    Christy_Roach 84 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    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
    RandyHayes 76,287 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    @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
    Christy_Roach 84 on at
    Re: Carry forward date of request and don't allow it to be changed in edit mode

    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.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard