In this time I have consumed many hours of video tutorials and user manual, and in this moment I building my second App.
This is my first post and I know that there is many people with more time of development, but I can't find my answer and I don't know how I can do it.
The point is that I have in my gallery, all records and I have added an icon to delete the record, but I only want to have this option only for the last record, and I don't know what condition I need write in "visible".
I tried with: "If(BrowseGallery1.Item.ID = Last('origin');true;false)"
Sorry for my English, I hope that you can understand me... hehehe
Solved! Go to Solution.
ID=First( Sort( Filter( [@'RECEPCIÓN DE MATERIALES']; StartsWith( Title; TextSearchBox1.Text ) ); ID ; Descending ) ).ID
in the Visible property of the icon. This formula will show the last item in your gallery and should take into account the filter. It is not necessarily the last item that is in your unfiltered list.
Are you trying to show an icon only in the final record of the gallery?
Put this code in the Visible property of the icon.
ThisItem.ID = Last(BrowseGallery1.AllItems).ID
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I found that instead of using Last(Browsegallery.AllItems), use the actual formula for the Items property of the gallery instead. In my example
nwind_ordernumber=First(Filter(Sort( Orders, 'Order Number', Descending ),TextInput2.Text in 'Order Number')).'Order Number'
@DrrickrypIs exacly that I want to do it.
But I don't know how can reply your example in my form because I don't understand the function, but I thought also that I need some come condition over the option "Visible" of the trash icon.
My formula was just an example from a sample database. You would replace my formula with the Items property of your gallery but sort it by ID, Descending and use First(). I almost never use Last() or Max() in my apps because they are not delegatable and if the list exceeds the PowerApps limit, they will not give the correct value. First(Sort( Descending will always work no matter how big the data set is.
Check out the on demand sessions that are available now!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021