cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Sharepoint list value created from powerapp or sharepoint form?

Is there a way to know if a sharepoint list item was created via the PowerApp or another method (InfoPath, sharepoint form)?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Sharepoint list value created from powerapp or sharepoint form?

Here's a bit more detail... 

 

First I created a list for my Audit data.

Audit table.jpg

 

Obviously you would have different information you want to audit.  The created by and modified by columns are automatically applied by the system.  I just added them to the view in SP so I could easily see them.

In the app, I just add another command to my save activity...

Save.jpg

On the screen containing my edit form, I have a checkmark to do the save.  Normally, I would just use a SubmitForm(formname) in the On Select to commit the changes to the list.  In this case, I add another command before I do the SubmitForm to do the patch.  

Patch example.jpg

 

For more information on patch, check out:  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch and Shane Young's video on Patch (@Shanescows). 

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Sharepoint list value created from powerapp or sharepoint form?

I open my sharepoint list in another tab in Chrome so I can monitor what PowerApps is doing to it. 

 

Or, you could temporarily add another screen to your app on which you use a gallery to display the items in the list.

 

Alternatively, you could use a Flow to get the items in the list and display them - even have Flow email you a 

list of the items in the list.

All would accomplish what you are trying to do.  

Highlighted
Frequent Visitor

Re: Sharepoint list value created from powerapp or sharepoint form?

Thanks @LRVinNC! To clarify, some users will log new data straight from the sharepoint list, while others will log data via the powerapp. I want to encourage logging via the powerapp, so I was looking for the best way to see what method was used to log the data when I'm looking at it in the SharePoint. The closest I've gotten to this is via a Flow that sends me an email when the powerapp is used so I can at least compare that count to the new sharepoint rows. But it would be nice to see this at the individual item level.

Highlighted
Super User
Super User

Re: Sharepoint list value created from powerapp or sharepoint form?

Create an audit trail list to which you add a record each time an item is added via the PowerApp.  I do this within one of my apps so I know who is changing what in the system.  I do this  via a Patch in the On Select for the mechanism that executes the save to SP.  (In my case this is tied to a checkmark icon on each screen).  Then I had another screen in my app which allows me (and only me) to access the audit history.  But you could obviously do it via separate app entirely or just view in SP.  I don't know of any way to log if they are updating the list directly.  

 

One thought you might explore would be if you could add a source column to the SP list and add a value to it if the updates was made via the PowerApp and have it left blank (or an alternative selection made) when updated via the SP list.  

 

A finally thought would be to see if a customized form in SP (which invoves PowerApps, would let you control either posting to an additional list at the same time or at least plugging a value behind the scenes into a source field.  I don't have a lot of experience with the customized forms but I'm sure other community members could advise on that.

Highlighted
Frequent Visitor

Re: Sharepoint list value created from powerapp or sharepoint form?

I am VERY interested in the option to put a Patch on the On Select. Could you elaborate on that? What is this patch and how do I set it up?

Highlighted
Super User
Super User

Re: Sharepoint list value created from powerapp or sharepoint form?

Here's a bit more detail... 

 

First I created a list for my Audit data.

Audit table.jpg

 

Obviously you would have different information you want to audit.  The created by and modified by columns are automatically applied by the system.  I just added them to the view in SP so I could easily see them.

In the app, I just add another command to my save activity...

Save.jpg

On the screen containing my edit form, I have a checkmark to do the save.  Normally, I would just use a SubmitForm(formname) in the On Select to commit the changes to the list.  In this case, I add another command before I do the SubmitForm to do the patch.  

Patch example.jpg

 

For more information on patch, check out:  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch and Shane Young's video on Patch (@Shanescows). 

View solution in original post

Highlighted
Super User
Super User

Re: Sharepoint list value created from powerapp or sharepoint form?

 

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,459)