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 / Last edited by / last ...
Power Apps
Answered

Last edited by / last edit time

(0) ShareShare
ReportReport
Posted on by

Hello all,

I have a -hopefully- easy to answer question: in a view form, is it possible to have a datacardValue have display the last user who edited that datacard and the time it was edited? This is if the user used the 'edit' button and then saved the info from it. For example:

Gallery -> Detail Form

- Detail form "last edit/last time edited" is null/empty space/placeholder text

-- User goes to "Edit" -> EditForm -> make changes -> save form -> back to detail form

- Detail form "last edit/last time edited" now has as value the User().Email (or name?) of the one who last made a saved change and the time it was at.

Categories:
I have the same question (0)
  • LRVinNC Profile Picture
    2,297 on at

    If your data is saved in a SP list you will have the Modified By and Last Modified Date/Time stored on the record you edited. I currently use these to display on an audit history screen for one of my apps. 

    If you are using another storage medium, you might have to create a place to store this information on each record (unless that storage medium also offers something similar to what SP does) so you can retrieve it and display on the view form.  I don't know of anything you an use independent of the data source to accomplish this goal.  

  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @Anonymous ,

     

    If you're using a SharePoint Online list as your data source, (and possibly CDS as well, I think), they already record this information for you in the 'Modified By' and 'Modified' columns.  All you have to do is display them on your form.

    If you're using something else that doesn't already do this, then you may have to create those columns yourself and populate them with the data you want when the user submits the form.

    With the columns created you can add the data cards to the form, pre-populate them with data and then hide them.

     

    For the Modified By data you can create a simple plain text column in your source (let's call it ModifiedUser).  In the form, once you've refreshed the data source and added the ModifiedUser column as a datacard, the datacard Default: property should be ThisItem.ModifiedUser.  You can override this by unlocking the data card and changing it to User().Email

     

    For the Modified column create a date column in your source - if you can, otherwise plain text will also work, you'll just have to convert from text to date when you want to perform date functions.  Let's assume this column is called ModifiedDate.

    As before, refresh the source, add the column to the form, but this time change the Update: property to Now()

    The only reason I use the Update property on the date is that if this is time sensitive and the person takes two hours to edit the form, Now() on default will record the time from when the form was initially rendered.

    Update should only apply it as the form is submitted.

     

    Hope this helps

    RT

  • mogulman Profile Picture
    764 on at

    On LastModified you need to check timezone issues.  If you are using SQL Server you need to make column type datetimeoffset.

  • Community Power Platform Member Profile Picture
    on at

    @RusselThomas 

    Sorry for late answer. The last user who modified worked for me but using the Now() in Update seems to give me some problem. First time worked alright, but second time accesing edit view:

    lastModAt.png

    Not sure how or what to change to avoid that error

     

  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @Anonymous ,


    What is the data type of the column "LastModifiedAt"?

    What property is that formula in?  (the image is cut off on the left so I can't see which property field it is)

     

    The error is saying the column "LastModifiedAt" does not have a maxlength property which would be correct if it's a date column, (as opposed to a Text column).  The fact that PowerApps is looking for a maxlength property might indicate that the type was originally text and then changed to date - but for PowerApps to recognise this you may have to refresh your data source and/or recreate/reconnect your form to the data.

     

    Easiest way to test is to create a whole new form connected to the data and see if the property field is still there and giving errors.

    Can you widen the screenshot to include the whole screen?

     

    Kind regards,


    RT

  • Community Power Platform Member Profile Picture
    on at

    @RusselThomas 

    It was indeed as you said and after closing and reopening the app, along with refreshing the source, it took the field as date instead of text, so now I could use the Now() without problems.

    Again, thank you very much.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard