Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

Document vs Picture

Jaymer

Imagine a Parent BO which will have multiple attachments, like images & PDFs.

If I only had a Document field, I can store images in that as well as a PDF.
Do I really need a separate Picture field for images? (as shown in the Attached pic)
What does a Picture datatype get me that a Document datatype doesn't - and vice versa?

one example: I think if its a Picture, there's a built-in image slider/lightbox thingy that is in the PhotoAlbum sample app... that option is only available for a Picture field.

But if I'm not going to use that, is there any reason to not just have a Document field and store EVERYTHING in there?

J

Screenshot 2024-11-12 at 11.31.31 PM.png


kklosson

I use both types but always for different purposes. Like you said, I use picture type only when the object needs to be displayed on screen or in a report. I presume the document display function will display an image if needed. So, I use the picture type only if I need the picture to display on screen or in a report without additional user action.


Jaymer

If I need an image on the screen, then BECAUSE I store images/attachments/documents in the FS, I can use HTML with an <img> tag.

What I have not tried is showing a Document type (which is an Image) in a Report... that may be a dealbreaker that would force me to store them separately.

Then, I would have an "Add Image" button and another "Add Document/PDF" button for the user to decide.


PointsWell

Jaymer wrote

But if I'm not going to use that, is there any reason to not just have a Document field and store EVERYTHING in there?

All images are documents but not all documents are images. Does specifying Picture limit what can be stored more easily than the Document attribute? Haven't used so don't know the answer


kklosson

You can certainly display a picture attribute in a report. If it is stored in a document type, then no. I see lots of workarounds. Let's say you want to store everything in a document type. You can have a second attribute to store a picture and an update rule where if the document is .jpg, .png, .gif, etc, then it is exported and loaded into the picture attribute. All depends on your requirements, of course.