Reputation: 1
Launch Attachment from LookUp SharePoint List in PowerApp:
I have two SharePoint lists. The main list is called 'Methods' and has a LookUp Column 'Risk' and another column called 'AttachmentM' containing PDF attachments.
The LookUp list is called 'Assessments' and the column containing the LookUp values is 'Code' with another column in the list 'AttachmentR' containing PDF attachments:
Methods table (Main)
| Title | Risk | AttachmentM | Sub Division |
Assessments Table (LookUp) | AssessmentsID | Code | AttachmentR |
I have a gallery in PowerApps to display data from the Methods table with an icon that launches the PDFs from AttachmentM fine using the following code:
For the Gallery in the PowerApp:
`Sort(
Search(
Filter(
'Methods',
varSubDivision in 'Sub Division'.Value
),
txtSearch_scrRAMS.Text,
'Title'
),
'Title',
SortOrder.Ascending
)`
For the icon to launch PDFs from AttachmentM column:
ForAll( ThisItem.Attachments, Launch( ThisRecord.AbsoluteUri, {}, LaunchTarget.New ) )
What I am trying to do is to launch the PDFs from the LookUp 'Assessments' SharePoint list from the AttachmentR column in the same galley.
I followed a Shane Young tutorial and managed to pull the values for the LookUp 'Code' column from the Assessments list into a 'RiskID' column in the 'Methods' list and display it in the PowerApps gallery using the code:
`ThisItem.'RiskID'.Value`
How can I launch the attachments from the LookUp SharePoint 'Assessments' list in the same gallery? Ideally I would like to launch both attachments from the 'Methods' main list and 'Assessments' LookUp list at the same time but if not, at least be able to do it separately in the same gallery.
Upvotes: 0
Views: 453