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?
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
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)
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 757 Most Valuable Professional
Michael E. Gernaey 322 Super User 2025 Season 2
MS.Ragavendar 209 Super User 2025 Season 2