cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
santukondapally
Helper II
Helper II

People Picker History

Hi Team,

 

I am building an asset tracking app and i want to maintain  history of the asset like to whom it was assigned. For this i had created all assets in one sharepoint list and the assigned field is of people picker.

 

Now  in order to maintain history of the asset iam planning to maintain a separate list called as Assignee list where in on Edit form when only the assigned field(People Picker ) is changed and summited i want to make an entry in this table.

 

Is this Possible in Edit form of the sharepoint list ??

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@santukondapally 

Yes, this is possible.  However, your EditForm would seem to be based on the Asset list, so you would need to do this as part of a separate update.

I would suggest the following:

In the submit button (or whatever you have), before you do the SubmitForm, do a check of the Assigned person and see if it is different and set a context variable to indicate it.

ex.  

UpdateContext({lclAssignedChanged: <insertTheSameItemPropertyThatYouHaveForTheFormHere>.Assigned.Email <> yourFormName.Updates.Assigned.Email})

Then in the OnSuccess action of your form to implement the following:

If(lclAssignedChanged,
   Patch(AssigneeList, Defaults(AssigneeList),
     {...column values for your other list here...}
   )
)

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@santukondapally 

Yes, this is possible.  However, your EditForm would seem to be based on the Asset list, so you would need to do this as part of a separate update.

I would suggest the following:

In the submit button (or whatever you have), before you do the SubmitForm, do a check of the Assigned person and see if it is different and set a context variable to indicate it.

ex.  

UpdateContext({lclAssignedChanged: <insertTheSameItemPropertyThatYouHaveForTheFormHere>.Assigned.Email <> yourFormName.Updates.Assigned.Email})

Then in the OnSuccess action of your form to implement the following:

If(lclAssignedChanged,
   Patch(AssigneeList, Defaults(AssigneeList),
     {...column values for your other list here...}
   )
)

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  thats a good idea i will try and let you know. Thanks for your reply and your idea on the same.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,427)