Hi,
So I've found a way to display which user modified existing data along with the date and time modified through Shane Young's video. Now I want to know is it possible for me to identify which user created a new record in a table along with the data and time created to be displayed inside the gallery. I tried many ways yet failed. Any suggestion to work around it?
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
Sorry I misunderstood that your data source was sharepoint list.
Since in Excel, there are no system fields like in sharepoint list: Created by,Created,Modified by,Modified, you need to update them by yourslf.
1)Created by,Created,Modified by,Modified: please update them when you create the record
2)Modified by,Modified:please update them every time you edit the record.
Here's my solution:
I assume that you use form to create record and edit record
1)when you create record, try this formula:
Patch(VerificationDetails,Defaults(VerificationDetails),Newform_name.Updates,{Created by:User().Email,Created:Now(),Modified by:User().Email,Modified:Now()})
2)when you edit record, try this formula:
Patch(VerificationDetails,the item that you want to edit,Editform_name.Updates,{Modified by:User().Email,Modified:Now()})
Please replace with your fields name, new form name, edit form name, the item that you want to edit.
If you are using the same form to create record and edit record, try this:
If(Formname.DisplayMode=New,
Patch(VerificationDetails,Defaults(VerificationDetails),Newform_name.Updates,{Created by:User().Email,Created:Now(),Modified by:User().Email,Modified:Now()}),
Formname.DisplayMode=DisplayMode.Edit,
Patch(VerificationDetails,the item that you want to edit,Editform_name.Updates,{Modified by:User().Email,Modified:Now()}
)
)
Best regards,
If you are using a sharepoint list as a database then it will be the 'Created' column and the 'Created By' Column.
In order to pull these through in a gallery you can use the formula ThisItem.Created and ThisItem.'Created By' on labels.
Hope this helps 🙂
Hi @Anonymous ,
Do you want to know which fields record the value of creator and created time in sharepoint list?
Please notice these system fields in sharepoint list:
(these are system generated field, no need you to create these fields or update these fields)
1)Created by(person type): the person who create the item
2)Created(date and time type): the time that the item was created
3)Modified by(person type):the person who last modified the item
4)Modified(person type):the time that the item is latest modified
You could directly display these fields in powerapps.
For example:
insert a gallery, set its data source to your sharepoint list.
You just need to set the label's Text inside the gallery:
ThisItem.Created
Or
ThisItem.Modified
Please notice that Created by and Modified by field is person type, so you need to use formula like this:
ThisItem.'Created By'.DisplayName
Or
ThisItem.'Modified By'.DisplayName
Best regards,
Hi @v-yutliu-msft
Sorry, my data source is a excel file from google drive. Does it use the same method as well ? As for "Modified by" , I use the LastSubmit function for OnSuccess of a form and it worked flawlessly, but how do I record/audit who created a new data by their name and time created ? I've also attached the image of an example of how I record the LastSubmit function. I want something like that to record about the newly created data on the same field.
Hi @Anonymous ,
Sorry I misunderstood that your data source was sharepoint list.
Since in Excel, there are no system fields like in sharepoint list: Created by,Created,Modified by,Modified, you need to update them by yourslf.
1)Created by,Created,Modified by,Modified: please update them when you create the record
2)Modified by,Modified:please update them every time you edit the record.
Here's my solution:
I assume that you use form to create record and edit record
1)when you create record, try this formula:
Patch(VerificationDetails,Defaults(VerificationDetails),Newform_name.Updates,{Created by:User().Email,Created:Now(),Modified by:User().Email,Modified:Now()})
2)when you edit record, try this formula:
Patch(VerificationDetails,the item that you want to edit,Editform_name.Updates,{Modified by:User().Email,Modified:Now()})
Please replace with your fields name, new form name, edit form name, the item that you want to edit.
If you are using the same form to create record and edit record, try this:
If(Formname.DisplayMode=New,
Patch(VerificationDetails,Defaults(VerificationDetails),Newform_name.Updates,{Created by:User().Email,Created:Now(),Modified by:User().Email,Modified:Now()}),
Formname.DisplayMode=DisplayMode.Edit,
Patch(VerificationDetails,the item that you want to edit,Editform_name.Updates,{Modified by:User().Email,Modified:Now()}
)
)
Best regards,
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
218 | |
207 | |
85 | |
57 | |
36 |