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

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,160)