Discussions

Expand all | Collapse all

Can i add a picture of a product to products table?

  • 1.  Can i add a picture of a product to products table?

    Posted 08-22-2017 13:56
    I wanted to see if I could add a picture of each product to the products table and form. I know I can add an attachment, but I'm looking for the picture to remain up within table and form when i view it. Is there a way to do that?


  • 2.  RE: Can i add a picture of a product to products table?

    Posted 08-22-2017 14:19
    If you can get the URL from the file attachment field then you could make a formula text field that takes HTML tags
    "<img src=\"" & [URL] & "\" />


  • 3.  RE: Can i add a picture of a product to products table?

    Posted 07-12-2018 14:34
    can this be edited to adjust the size of the picture?


  • 4.  RE: Can i add a picture of a product to products table?

    Posted 07-12-2018 14:48
    The 150 in the formula below sets the height.  alternatively you can set the width.


  • 5.  RE: Can i add a picture of a product to products table?

    Posted 07-12-2018 14:50

    My formula looks like this: "<img src=\"" & "https://rostr.disney.com/ROSTRWS/rest/v1/photos/rostrid/"; & [Personnel Number] & "\" />"


    I wasn't sure where to put the " height=\"150\">"



  • 6.  RE: Can i add a picture of a product to products table?

    Posted 07-13-2018 00:13
    Try this syntax

    "<img src=" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e140/v0" & " height=\"150\">"


    140 is the field id with the uploaded image.


  • 7.  RE: Can i add a picture of a product to products table?

    Posted 07-13-2018 17:56
    It's not from an attachment field, it's from a company webpage


  • 8.  RE: Can i add a picture of a product to products table?

    Posted 07-13-2018 18:04
    I suggest that you post this was a new question.


  • 9.  RE: Can i add a picture of a product to products table?

    Posted 08-22-2017 14:21
    No problem.
    The low tech way to show an image on a form is to use the checkbox on the field properties to show the image.  But that does not work when used on a report.

    To show an image on a report this works

    If(Contains("jpg,jpeg,png,gif", Right([File],".")),

    "<img src=" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e140/v0" & " height=\"150\">"
    , "No Preview Available")

    or just

    "<img src=" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e140/v0" & " height=\"150\">"


    This would be a formula text field type

    The e140 in the above refers to field ID 140 being the field holding the file attachment.

    Play with the 150 to get the size you like. you can also specify instead width=\"150\"

    Note that if you have a huge report of images, it will take a long time to load the page.


  • 10.  RE: Can i add a picture of a product to products table?

    Posted 08-24-2017 16:29
    That's pretty clever for not using script:

    Contains("jpg,jpeg,png,gif", Right([File],".")),


  • 11.  RE: Can i add a picture of a product to products table?

    Posted 08-24-2017 16:41
    tip of the spear.


  • 12.  RE: Can i add a picture of a product to products table?

    Posted 08-22-2017 14:55
    this was a big help. I got it on the form to show, but it did not show on report. do i need to have the If statement on this second formula or no (i did not add).


  • 13.  RE: Can i add a picture of a product to products table?

    Posted 08-22-2017 16:02
    You do not have to do the IF statement, but if you have records without images, then you will want to suppress the image if the file is not loaded.  otherwise there will be an icon showing of a missing image.