cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
orbd
Level: Powered On

Tracking changes in Date Picker

Hi everyone,

 

Currently developing an action tracking app, and in it we want the ability for users to change the due dates of actions that they are assigned. However, we do also want to track any changes that are made. For example, if an item was due 10/30/2019, and then the user changes it to 11/30/2019, we would want to be able to audit that.

 

Currently, my app is connected to a SharePoint list. Any guidance that can be provided would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Tracking changes in Date Picker

Hi @orbd ,

How does the user change the Due date for a specific action within your app? Via changeing the date value within the Date Picker control?

 

Just as @RandyHayes  mentioned, currently within PowerApps, there is no direct way to track the changes made to a specific item in a SP list data source.

 

As an alternative solution, you could consider take a try to create another SP list to store the changes made to the Due Date value of specific action items in your first SP list.

You could consider create another SP list as below:5.JPG

Note: The List Item ID is a Number column in above list, which used to store the Item ID value of the specific action item the user made changes to. The ChangedDueDate column is a Date type column, which used to store then changed Due Date value the end user made to the specific action item.

I have made a test on my side, please take a try with the following workaround:6.JPG

 

7.JPG

I assume that you added a Gallery control within your app to list all available action records assigned to you. Please set the OnSelect property of the "Submit" button to following:

If(
    BrowseGallery1.Selected.ChangedDueDate <> DataCardValue6.SelectedDate && EditForm1.Mode = FormMode.Edit,
    Patch(
         '20190325_case8',
         Defaults('20190325_case8'),
         {
             Title: "Track Action Item Changes",
             'List Item ID': BrowseGallery1.Selected.ID,
             ChangedDueDate: DataCardValue6.SelectedDate
         }
    );SubmitForm(EditForm1),
    SubmitForm(EditForm1)
)

Note: The DataCardValue6 represents the DatePicker control within the ChangedDueDate data card in my Edit form.

On your side, you should type following:

If(
    BrowseGallery1.Selected.DueDate <> DueDatePickerBox.SelectedDate && EditForm1.Mode = FormMode.Edit,
    Patch(                            /* <-- Store the changes the user made to the specific action items */
         'YourAnotherSPList',
         Defaults('YourAnotherSPList'),
         {
             Title: "Track Action Item Changes",
             'List Item ID': BrowseGallery1.Selected.ID,
             ChangedDueDate: DueDatePickerBox.SelectedDate
         }
    );SubmitForm(EditForm1),
    SubmitForm(EditForm1)
)

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Tracking changes in Date Picker

@orbd 

There is no built-in audit or other tracking of datasources in PowerApps.  However, if this list is SharePoint based, then you can certainly turn on the version history on the list.  That way, any changes to records will be versioned and you will be able to see that information in the list itself.

If you need some other type of tracking, then you can always create a tracking or logging list and write records to it as the actions in your App happen.

 

I hope that provides some fuel for thought.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: Tracking changes in Date Picker

Hi @orbd ,

How does the user change the Due date for a specific action within your app? Via changeing the date value within the Date Picker control?

 

Just as @RandyHayes  mentioned, currently within PowerApps, there is no direct way to track the changes made to a specific item in a SP list data source.

 

As an alternative solution, you could consider take a try to create another SP list to store the changes made to the Due Date value of specific action items in your first SP list.

You could consider create another SP list as below:5.JPG

Note: The List Item ID is a Number column in above list, which used to store the Item ID value of the specific action item the user made changes to. The ChangedDueDate column is a Date type column, which used to store then changed Due Date value the end user made to the specific action item.

I have made a test on my side, please take a try with the following workaround:6.JPG

 

7.JPG

I assume that you added a Gallery control within your app to list all available action records assigned to you. Please set the OnSelect property of the "Submit" button to following:

If(
    BrowseGallery1.Selected.ChangedDueDate <> DataCardValue6.SelectedDate && EditForm1.Mode = FormMode.Edit,
    Patch(
         '20190325_case8',
         Defaults('20190325_case8'),
         {
             Title: "Track Action Item Changes",
             'List Item ID': BrowseGallery1.Selected.ID,
             ChangedDueDate: DataCardValue6.SelectedDate
         }
    );SubmitForm(EditForm1),
    SubmitForm(EditForm1)
)

Note: The DataCardValue6 represents the DatePicker control within the ChangedDueDate data card in my Edit form.

On your side, you should type following:

If(
    BrowseGallery1.Selected.DueDate <> DueDatePickerBox.SelectedDate && EditForm1.Mode = FormMode.Edit,
    Patch(                            /* <-- Store the changes the user made to the specific action items */
         'YourAnotherSPList',
         Defaults('YourAnotherSPList'),
         {
             Title: "Track Action Item Changes",
             'List Item ID': BrowseGallery1.Selected.ID,
             ChangedDueDate: DueDatePickerBox.SelectedDate
         }
    );SubmitForm(EditForm1),
    SubmitForm(EditForm1)
)

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,082)