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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Attachment - remove th...
Power Apps
Unanswered

Attachment - remove the attachment only if it was created by myself or only an admin can remove them

(0) ShareShare
ReportReport
Posted on by 247

Hello,

 

i am trying to find a solution at my canvas attachments that the user who has uploaded the attachment to be able to remove them and/ or an administrator.

 

let me know if that is possible.

 

thank you

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @kouliscon ,

    SharePoint does not record which user created an attachment, only who created or last edited the record.

     

    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.

    Visit my blog Practical Power Apps

     

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @kouliscon ,

    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.

    Visit my blog Practical Power Apps

  • kouliscon Profile Picture
    247 on at

    thank you @WarrenBelz 

     

    waht i found after researching at the internet is that i can remove the possibility to delete and already uploaded attachments by going to the datacardValue of the attachment at the "OnRemoveFile" and put: Reset(Self). Then the remove file will be disabled but i am looking for a solution someone like an administrator to still have the possibility to remove them...

     

    let me know pls

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @kouliscon ,

    You would just need to set a Variable for the Administrator then OnRemoveFile

    If(
     !IsAdmin,
     Reset(Self)
    )

    To set, have a reference list with email and role of staff and at App OnStart

    Set(
     IsAdmin,
     LookUp(
     YourRefList,
     YourEmailField = User().Email
     ).Role = "Admin"
    )

     

    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.

    Visit my blog Practical Power Apps

     

  • kouliscon Profile Picture
    247 on at

    thank you

     

    i have created a list named:  "summer associate attachements" and then i added two columns:

     

    1) people/ person with the email address

    2) role

     

    i made an entry with my email address and role Admin.

     

    i then went at the App OnStart and i added what you mention what you wrote above but there i already have

     

    If(!IsBlank(Param("ID")),Set(varID, Param("ID"));Navigate(Screen1,ScreenTransition.Fade));

     

    how can i combine them?

     

     

    And (Set(IsAdmin,LookUp('Summer Associate Attachments',Email = User().Email).Role = "Admin")

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @kouliscon ,

    You do not need to combine them - just run the Variable setup first. Also if that is a Person column (you really do not need one for this), you would need

    Set(
     IsAdmin,
     LookUp(
     'Summer Associate Attachments',
     YourPersonColumn.Email = User().Email
     ).Role = "Admin"
    );
    If(
     !IsBlank(Param("ID")),
     Set(
     varID, 
     Value(Param("ID"))
     );
     Navigate(
     Screen1,
     ScreenTransition.Fade
     )
    )

     

    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.

    Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard