How to display file that is attached to a single data type in a list of data

Hi
I currently have inputs adding a number of things to a data type This shall be defects. One of the fields is to upload a defect file to the data type defect. I then add numerous defects as a list to data type Houses (List of defects)
This all works fine and i display the list of Defects in a repeating group, again this all works
What i am struggling with is displaying a preview of the defect file that only 1 of the defects in the list has (only 1 defect in the list will ever have a file attached to it). I can preview the file and it shows the first page as a preview when the first defect in the list has the file attached.
If i add a defect that doesnt have a file attached it is previewing the first defect that has no file so there is nothing being displayed as it doesnt have a file attached.
I am previewing the file by “Parent Groups house’s defect:each items defect file”

How do i tell the file preview that i want it to always display the defect that has the defect file attached to it? and not the any of the others that will have “defect file” as a blank field in the data types

This topic was automatically closed after 70 days. New replies are no longer allowed.