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 / Delete Item: Gallery |...
Power Apps
Unanswered

Delete Item: Gallery | Calendar Control - SharePoint List as Source

(0) ShareShare
ReportReport
Posted on by 12

Hi everyone, 

I have a ready calendar control based on Reza's template, everything work well but I want a button to create the item.

I have used Remove(SGCalendar, Gallery2_1.Selected) function however nothing work, as in its load but nothing got deleted.

What is the right coding for this? Below would the snapshot on how I name and list the items.

 

 

powerapp.png




Categories:
  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Fierul ,

     

    Is the button using that formula Button2_1 in the picture? If so, there is no problem in my test.

     

    If the button is outside the gallery, the problem occurs because "Gallery2_1" is a sub-gallery. If your button is at the same level as "MonthDayGallery1_3", you cannot get the selected item of "Gallery2_1". Because there are many items in "MonthDayGallery1_3", each item has a "Gallery2_1".

    If you want to use the selected item from "Gallery2_1", then the button should be under "MonthDayGallery1_3", at the same level as "Gallery2_1".

     

     

     

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Fierul Profile Picture
    12 on at

    Fierul_0-1683689858909.png


    Thanks for sharing the info, I understood that now but the button is actually inside a container. So how should I perform this correctly then?

     

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Fierul ,

     

    Still the same problem, because "Gallery2_1" is a sub-gallery, so on the outside, we can't distinguish which "Gallery2_1" is.

    I think, you can add a button or other control in "Gallery2_1" and save the current item in its OnSelect property, like this:

    Set(vart,ThisItem)

    Then delete the item in the button under container:

    Remove(ListName,vart)

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Fierul Profile Picture
    12 on at

    Thanks!

    I managed to perform what I intended to do with your suggestion but after the item got deleted, I created a new item for testing and suddenly got error as per below;

    Fierul_0-1683702490912.png

    I wonder why now when its actually worked on the first round

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard