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 - Microsoft Dataverse
Answered

How to get files from dataverse related table to editform on canvas app

(0) ShareShare
ReportReport
Posted on by 43
Hi,
 
I am trying to display the file on edit form screen from a data verse table which has child relation to the main table.
I needed to store the files to a child table, couple of file type columns to attach single file to each file column and another file column where 10 files can be attached,I'm able to patch the file from a file type column but when i try to pull the file from file column(column Name : FundReport) that has single file to edit form screen using the code below,it is  not working.
 
forall(filter('child table', 'ID'=selectedgallery.id),{DIsplayName:ThisRecord.'FundReport'.FIleName,Value:ThisRecord.'FundReport'.Value})
 
With this code above, it displays file that i needed but along with other files from other column with no name and value as in the image below, here i only need the that has name in the image
 
i tried with look up and it didn't work, no name and no value
LookUp('child table','ID'=selectedgallery.id,{DisplayName:ThisRecord.'FundReport'.FileName,Value:ThisRecord.'FundReport'.Value})
 
 
Thanks for the help...
 
I have the same question (0)
  • Verified answer
    SwatiSTW Profile Picture
    714 Super User 2025 Season 2 on at
    How to get files from dataverse related table to editform on canvas app
    1. Check the Relationship - Make sure the child table is correctly related to your main table, and the ID field in child table corresponds to the selected record in your gallery.
    2. Filter Files from the Correct Column - Use the following code to fetch only files from the FundReport column that are linked to the selected record
        ClearCollect(
            SelectedFiles,
            ForAll(
                Filter('child table', 'ID' = selectedgallery.id && !IsBlank('FundReport')),
                {
                    DisplayName: ThisRecord.'FundReport'.FileName,
                    Value: ThisRecord.'FundReport'.Value
                }
            )
        )
    This will create a collection named SelectedFiles.
    The Filter ensures only rows with the selected ID and non-blank FundReport are included.
    The ForAll pulls only the file name and value from FundReport.
    3. Bind the Collection to Your Gallery or Control - Set the Items property of your gallery (or control) to SelectedFiles
    For example in the gallery, set the label text to ThisItem.DisplayName to show the file names. 
    4. For a Single File- If you only need one file, replace the above with this simpler code:
        LookUp(
            'child table',
            'ID' = selectedgallery.id && !IsBlank('FundReport'),
            {
                DisplayName: 'FundReport'.FileName,
                Value: 'FundReport'.Value
            }
        )
    This fetches the file directly without creating a collection.
     
  • Sammen Profile Picture
    43 on at
    How to get files from dataverse related table to editform on canvas app
    Thanks for the help...

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

Featured topics