0

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.

13 replies

null
    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    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".

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    After you set the parent-child relationship, if you want the images to appear in the table view of the parent (in addition to appearing in the form detail view), then click a column header and select the relation name, and then select the image field name.

    • Halio
    • Halio
    • 4 yrs ago
    • Reported - view

    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.

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    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.

    • Halio
    • Halio
    • 4 yrs ago
    • Reported - view

    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. 

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    You could add a "Card" view and include the image in the card. Then in detail view you could set the image field size to maximum width. Users could use their up and down arrow keys to instantly navigate from record to record seeing both a small and large view of each image at the same time.

    • Halio
    • Halio
    • 4 yrs ago
    • Reported - view

    I do have a card view that you described. The main downside is that I am not able to group the cards by student. Is there some way to do that? Without that, there could be 7 cards for one student and 1 for another.

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Include student name on Card and search by name.

    • Halio
    • Halio
    • 4 yrs ago
    • Reported - view

    I do have that as a workaround for now. I'm still trying to minimize these kind of workaround/hacks as I am worried that other teachers will get confused and not remember them which could hamper the planned Ninox adoption school wide.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    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.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    PS: Used example database is the built-in Invoices template

    • Halio
    • Halio
    • 4 yrs ago
    • Reported - view

    This looks promising Steven! Could you share the file you used so I can see it and hit the ground running?

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

Content aside

  • 4 yrs agoLast active
  • 13Replies
  • 3951Views