Hello
I am very new to PowerApps and am trying to build a simple app to display sharepoint list item data. I have added filter controls to my gallery to sort columns ascending, descending and I have added an icon to open the one and only pdf attachment to each list item.
For the column sorting, I am using the following in the Items property for the gallery:
Switch(
locSortColumn,
"Name", Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID), Name.DisplayName, If(locSortAscending, Ascending, Descending)),
"Inductor", Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID), Inductor.DisplayName, If(locSortAscending, Ascending, Descending)),
"Date", Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID), Date, If(locSortAscending, Ascending, Descending)),
"Archive", Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID), Archive, If(locSortAscending, Ascending, Descending)),
Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID),Modified, Descending)
)
But - this prevents the attachment icons 'On Select' property from working - I am usng:
Launch(First(ThisItem.Attachments).AbsoluteUri)
I don't understand why this might be - when I use a simple Sort, the attachment link works again:
Sort(Filter('Laboratory Users',LaboratoryID=gly_Laboratories.Selected.ID),Modified, Descending)
Can anyone help me out?