
Displaying Multiple Image Attachments from Multiple Records
I have a table that holds records with one image attached to each record. Multiple of these records are linked to the same parent.
The other table has the list of parents and for each parent I am trying to display the attachments from each of the records from the above mentioned table with the images.
How do I pull in those image attachments from each record and have them all displayed under each linked parent.
Some parents have 1 record with one image.
Other parents have 7 records with 1 image each.
In both cases, I want 1 or 7 images displayed.
-
I might not be understanding your question. You mention that the two tables are already "linked". What kind of a "link" do you have between the parent and child tables? If you go to the child table preferences and select "Create table Reference" from the lower right and then drag the parent reference from right to left, that will create a reference to the parent. Thereafter, when you return to the parent table record detail there should be a new table view element. Then click the magnifying glass to select and relate each existing child image to the parent. This procedure should result in the images being "displayed under each linked parent".
-
Dean, thank you for your detailed response. I have what you explain setup. What I am trying to do in the parent table is to have all the images of the child table displayed large enough so it is readable by the user without having to click in and magnify each child record's image attachment.
When we quickly look over many records (filter + arrow keys to move between records) this would allow us to see the attachments for each student. Clicking in and magnifying would make this fairly inefficient.
-
It seems like numerous factors would need to be taken into account, like: are you using the Ninox Cloud, what type of devices do most of your users use, type of attachments (ie. img vs pdf), the dimensions of the attachments (letter size?), default application used to open the attachements, etc? I agree that what you describe would be nice. Perhaps someone with more experience with attachments will provide suggestions.
-
To answer your questions:
Ninox Cloud
devices: iPadOS, macOS, on Windows Chrome browser
attachment types: images only
size: varies (it is either scanned in with a flatbed scanner and cropped or with a mobile scanner app & cropped)
I was hoping someone maybe as a sample Ninoxdb where something like this has been implemented. I couldn't find one in the Ninox Webinar 2019 collection or on the Nioxus website.
A gallery type block baked into Ninox would be the easiest long term solution for the average user. Insert gallery field and select with table-field you want to have displayed.
-
Something like this?
Create as many formula fields with the code displayed like above as needed but increment the highlighted number.
Let me explain: the first line 'let currRec := this;' puts the current records'ID in thge variable currRec.
In second line 'select Customer where ParentOfCustomer = currRec' i create an array of all the records linked with the current record and with 'item(select Customer where ParentOfCustomer = currRec, 0)' I select the first recordID in line of that array (arrays starts counting with zero)and put it in variable i with let i:= ....
Third line, with
record(Customer,i).Photo
I pull up the Photo.Steven.