cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jvangundy0528
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

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

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
LRVinNC
Super User
Super User

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.  

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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.

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.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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?

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

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

 
LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,193)