How do I get an image to display on a table properly?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a table called Pictures that has several png files and it is linked to a table called Log. The relationship established between the two is the Log has many Pictures. I'm trying to get a Log record to pull one of the Pictures png files depending on what is entered in the Log record (the conditional statements I'm ok with). I created a text field in the Log table and created text field, turned on the html tags option and I've tried two methods that I think is either I missing something or I don't know what's wrong:
1) I use "<img src=\""&URLRoot()&"up/"& [_DBID_IMAGE]& "/a/r"& [Record ID#] &"/e6/v0\">" (Key field id Record ID and field ID of image files is 6) Result: comes out as a broken link in the Log table.

2) I use "<img src=\"https://abc.quickbase.com/up/dswe3scsv/g/rc/eg/va/Green -Arrow.png\">" Result: I can see the images but my other users cannot see it. They see them as an "x" as the image.

Anyone have this problem or know how to fix it
Photo of Coreen

Coreen

  • 10 Points

Posted 3 years ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
One thing to check for option 2 - is if your users can see the Log table.

If they don't have access to view the Log table, then they won't be able to see the data (or images, etc.) from there.
Photo of Coreen

Coreen

  • 10 Points
I went as far as giving one of them administrative access so the access matches mine and it still doesn't work.
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
I'd say start the debugging with Option 2 - where you can see the image, but they can't.  Since you can see the image - we can try and see if it's a permissions problem.

1)  Get the URL for one of those uploaded images - and see if the user can see it on their browser.
e.g.
https://abc.quickbase.com/up/dswe3scsv/g/rc/eg/va/Green-Arrow.png

2)  If yes, then have them go to the Log record where the image is stored in the File Attachment field.  
- can they see the Log record?
- can they access the image in the File Attachment?
Photo of Coreen

Coreen

  • 10 Points
Answer to #1: Yes.
Answer to #2: They can see the other contents in Log record, but they can't access or view the image from Log record. And this coming from someone who has administrative access.
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
By "administrative access" - do you mean they have the same "Administrator" role as you?  Are they also in another role (with less permissions)?

When you say "they can't access or view the image from Log record" - do you mean they don't see the File Attachment field at all on the form or in reports?  Or that they do see the File Attachment field, but an error comes up when they try to view, add a file, delete a file?

Is there any field-level permissions set on the file attachment field?

This still sounds like a permissions issue - something in the level of access that's different between your users and you.
Photo of Coreen

Coreen

  • 10 Points
1) The other user has Administrator role
2) See the field in the Log Record, but they can't see the image that's supposed to appear in that field. All they see is an "X".
3) No special field permissions set on the file attachment field. I get what you're saying as well, but that's why I tried using Administrator role and it just doesn't work.
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
When you say "they can't see the image that's supposed to appear in that field. All they see is an "X".".  What field are they looking at?

The image in the File Attachment field would be a link to the file.  Can they access the link?  Can they upload an image themselves into the File Attachment field?  Perhaps even the same image?

For the image to be visible (to show an "X") - I'm guessing you have a separate Formula Text field with the URL to the image file.

But first - I want to determine whether the user has access to the File Attachment field itself.
Photo of Coreen

Coreen

  • 10 Points
I figured out what the problem was, the DBID that was being referenced was incorrect. So I'm good to go. Thanks!
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
Ok great!