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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

No Item to Display message after gallery selected item deleted

(0) ShareShare
ReportReport
Posted on by

I have a form that's item property is the selected item in the gallery. I also have a button on the form to delete the record. When the record is deleted, from the Remove command, the form shows "No data source provided". Is there a way to reselect a record in the gallery so that I don't get this message?

I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at
    Re: No Item to Display message after gallery selected item deleted

    Please provide the code you have in your item property on your gallery.  Yes, there is a way to do this, but it's hard to tell you how to change the code without a bit more details 🙂  Thanks

  • AnnetteM Profile Picture
    on at
    Re: No Item to Display message after gallery selected item deleted

    I have 5 optional filter fields, so the code below checks to see if there is anything filled in those fields. Here is the code in the gallery's items property.

    SortByColumns(
    Filter(Violation,
    IsBlank(admin_filTicket.Text) || IsEmpty(admin_filTicket.Text) || StartsWith(Ticket,admin_filTicket.Text),
    IsBlank(admin_filReceipt.Text) || IsEmpty(admin_filReceipt.Text) || StartsWith(Receipt,admin_filReceipt.Text),
    IsBlank(admin_filPlate.Text) || IsEmpty(admin_filPlate.Text) || StartsWith(Plate,admin_filPlate.Text),
    IsBlank(admin_filLocation.SelectedItems.Value) || IsEmpty(admin_filLocation.SelectedItems.Value) || Location.Value = admin_filLocation.Selected.Value,
    IsBlank(admin_filStatus.SelectedItems.Value) || IsEmpty(admin_filStatus.SelectedItems.Value) || Status.Value = admin_filStatus.Selected.Value)
    ,"Title",Descending)

  • subsguts Profile Picture
    1,259 Moderator on at
    Re: No Item to Display message after gallery selected item deleted

    After you remove the record, it should automatically select the first item in the Gallery.
    Do you have any code in the Default property of your gallery?
    If not, please provide the code you are using on your "Remove Button".  It may be that you have to force it to select an item in the Gallery, although based on my experience most of the questions people ask is how to make it not select a record after this because they want to force the user to choose a record.
    Usually, I do this and then put a large label over the Form, with the words "Please select a _______ from the list".  This forces the user to choose which record they want to edit next and of if you have a button to have a new record, you can say "Please select a _________ from the list of Click "Add" to create a new one" or something like that.  Again, this eliminates your problem and I only suggest as I find it to be a better user experience instead of them wondering, why did the program select a record from the list, be it the 1st one or another, when all I did was remove a record from the list.

    Let me know your thoughts on how you'd like the app to perform and we can get there.

     

    Hope this helps.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard