Second question in a day is a personal record...but this is a tough one.
In one of the apps I am currently developing I have the requirement to have a "History" field into which I have to write back some of the important steps of the business process. - eg. Who and When did What...
Currently, when new item is created the default value, written in this field is made up of the following formula:
If(NewForm1.Mode=FormMode.New,"Created By: " & User().FullName & " on " & Text(Now(),"[$-en-US]dd/mm/yyyy"), Parent.Default)
And this is the result:
Now I need to figure out a way that lets me check if another field has been modified during the next steps of the process and "If Yes", add Who and When did What on a new line in the "History" field.
Any help will be highly appreciated!
Thank you in advance!
According to your description, it seems that you would like to display “Created By” or “Modified By” info on the app.
Please take the following function for a reference to see if it will work for you.
I am using this function to check if the item Modified time equals Created time, if True, it means that the item has been modified, display the modified user and modified time. If False, it means that the item is newly created, display the created user and created time.
If(ThisItem.Created<>ThisItem.Modified,"Modified by:" & ThisItem.'Modified By'.DisplayName & "on" & ThisItem.Modified,"Created by:" & User().Email & "on" & Text(Now(),"[$-en-US]dd/mm/yyyy"))
Please take a try with it and feel free post back if you need more help.
@v-yamao-msft, not exactly.
I don't want to display the "modified by" info in the app.
Yes, the first line in the "History" field is who created the record, but the second line for example, should be who changed the priotity, when he/she has changed it and the value of the priority field. And the process continues for the "Status" field - when it was changed, who changed it and what is the newly defined value for it?
This is how the details form look like to gain better perspective:
In other words, I am searching for a way to check if only specific field/values in the form has been changed, not the record as a whole, and if "yes", pick the newly defined value from the changed field and write it in the "History" field.
Thanks for posting and for any help because I'm stuck on this requirement and cannot find a way to achieve such a functionallity.