web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Detect SPO list item c...
Power Apps
Unanswered

Detect SPO list item create/update if done from outside

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

How to detect if SPO list's item created/updated from outside PowerApps?

We want to warn users if they do so, because it is not possible to prevent users to make edits directly or from other tools.

 

--

Regards,

Ankit Shah

L&T, India

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    You can do this with Power Automate / MS Flow. I do something like this on one of my SP List where if someone removes an item, I get a notification email. You can build the Flow to suit you needs in this regard.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, @Anonymous 

    But how to tell flow that it was deleted/created/modified from out of PowerApp?

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    ****UPDATE - I was preparing the below while you were corresponding with @Anonymous - both options should be considered ****
    On new records, one approach would be to have a true/false flag in a hidden SharePoint field and either Patch or Default it to true (hide it on the form) in Power Apps. You could then have a warning label on the screen with the Visible property 

    !ThisItem.YourFlagFieldName

    so it would not be visible if the field was true.
    Updates are a bit more problematic however one approach might be to have a shadow date field and write Now() to it as above every time a change is made. Then the Visible on the label would be

    Not(
     Text(
     ThisItem.YourShadowDate,ShortDate
     ) = Text(
     ThisItem.Modified,ShortDate
     )
    )

    There will be a Delegation issues on both the Not and the Date comparison. As I could not avoid the Date, I left them both in.
    Further on your issue of amendment by other means, I have several SharePoint reference lists in a sub-site that is nowhere in the site navigation display, so the user would have to know the sub-site and list names to find them.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    You could add a few extra columns to capture this. You could setup columns called

     

    'CreatedBy', 'LastModifiedBy' and 'DeletedBy'

     

    Then if any of the above are performed using your app you just Patch a comment to the respective column like 'PowerApps'.

    eg

    User creates record inside your App, include as part of the Patch 

    {..., CreatedBy: "PowerApps", ...}

    Do the same for modified and deleted.

     

    Then you have a record of what gets done inside the App and all other processes must then occur outside the app. So, you can then flag to the app user that if the column/s contain "PowerApps" it has been done by the app, otherwise not by the app.

     

    Flow could also filter these columns using the same criteria to find records with "PowerApps".

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz 

    Thanks.

    Regarding your answer...

    1) Creation of item: Yes, It is possible using default true/false boolean column. But what if user modified the same boolean column at the time of creating the item directly from SPO web view?

     

    2) Modification of item: Yes, Use of Not(ModifiedDate=ShadowDate(Now())) helps distinguish. But I have tested if for example ShadowDate's Now() is 10/06/2020 10:00:00 AM then ModifiedDate is 10/06/2020 10:00:01 AM, The delay of One Second in date causes incorrect result.

     

    --

    Ankit

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous Thanks.

     

    But if those extra columns are modified in such a way matching my app logic, then it will be incorrect.

     

    --

    Ankit Shah

    L&T, India

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Firstly anything here is a workaround and the system was never designed to manage this.

    The web view should not make any difference on the second option - you are looking at the modified date when the user loaded the record compared with a Lookup of the current modified date.

    With the seconds, you could use 

    DateDiff(
     ThisItem.Modified,
     Lookup(etc),
     Minutes
    )>0.1

    to manage this small discrepancy.

     

    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.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz Thank you for asking me.

     

    Right now I have created a flow which duplicates record in isolated datasource when a record is created/modified/deleted with ID & timestamp of original data source record.

    Let's see what further we can do with this....

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard