Discussions

Expand all | Collapse all

thumbnail image formula

  • 1.  thumbnail image formula

    Posted 03-28-2017 20:31
    So I have a field that shows a thumbnail preview of all images in 1 field.  However sometimes not all fields contain images, so quickbase leaves a blank, placeholder for it.  Is there any way I can alter this formula to not show the image if the attachment field is blank.  Im thinking an IsNull formula?

    Also, is there any way of displaying the thumbnail, but clicking on it will open up the full size image?

    Here is my formula:


    "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e31/v0\" /> <img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e32/v0\" /><img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e33/v0\" />"



  • 2.  RE: thumbnail image formula

    Posted 03-28-2017 20:37
    Put an IF statement on each of those formulas. Combined with a List function.
    So if the file is blank, it shows nothing, otherwise it used the image.

    List(" ",
    If([File Attachment Field 1]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e31/v0\" />"),
    If([File Attachment Field 2]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e32/v0\" />"),
    If([File Attachment Field 3]="", "", "<img width=\"250\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e33/v0\" />")
    )


  • 3.  RE: thumbnail image formula

    Posted 03-28-2017 20:49
    That worked nicely.  Thanks.  Is there any way of linking from the thumbnail to the original image?


  • 4.  RE: thumbnail image formula

    Posted 03-29-2017 13:44

    List(" ",

    If([File Attachment Field 1]="","","<a href='"&URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e33/v0/" & [File Attachment field 1]&"'><img src="&URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e33/v0/" & [File Attachment field 1]&" width='120px' /></a>".....



  • 5.  RE: thumbnail image formula

    Posted 09-27-2019 12:42
    I am trying to display an image based on the user that is selected, however I am only getting the url link code and not the image. Please find my formula below

    If(
    [Case Supervisor User]=ToUser("usersemail"), "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rf/ep/va/MoffitSignature.PNG",
    [Case Supervisor User] =ToUser("usersemail") , "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rg/ep/va/Mcnamara.PNG",
    [Case Supervisor User] =ToUser( "usersemail") , "<img src= https//octo.quickbase.com/up/bpwdnv4gj/g/rh/ep/va/Clark%20Signature.PNG", null)

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 6.  RE: thumbnail image formula

    Posted 09-27-2019 12:44
    Is your field type a formula rich text field type?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 7.  RE: thumbnail image formula

    Posted 09-27-2019 12:50
    Thanks for the quick response Mark and yes it is a formula rich text field type.

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 8.  RE: thumbnail image formula

    Posted 09-27-2019 12:58
    Try simply pasting the URL into the browser and I have a feeling it will fail. 

    I think it needs to be https://

    missing a :

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 9.  RE: thumbnail image formula

    Posted 09-27-2019 13:23
    You were right when I put the url I had in the browser it did fail. But it appeared when I added the :

    However for some reason, the image is still not displaying in QuickBase.

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 10.  RE: thumbnail image formula

    Posted 09-27-2019 13:29
    Also you need to close the > at the end to match (offset) the opening one in <img src

    "<img src= https://octo.quickbase.com/up/bpwdnv4gj/g/rf/ep/va/MoffitSignature.PNG>",


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 11.  RE: thumbnail image formula

    Posted 09-27-2019 13:50
    I added that to the formula and received the following error:



    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 12.  RE: thumbnail image formula

    Posted 09-27-2019 14:07
    The opening and hence closing quotes go outside the   <  > brackets.  You have at least  one quote inside the angle bracket.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 13.  RE: thumbnail image formula

    Posted 09-27-2019 14:15
    When I add the brackets outside the quotes, there is a syntax error on the first open bracket (<) saying "expecting text"

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 14.  RE: thumbnail image formula

    Posted 09-27-2019 14:29


    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 15.  RE: thumbnail image formula

    Posted 09-27-2019 14:36
    If you post the actual text of your formula as opposed to an image I will correct it.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 16.  RE: thumbnail image formula

    Posted 09-27-2019 14:39
    Here you go Mark. Thanks again!


    If(
    [Case Supervisor User] = Touser ("useremail"), <"img src= https://octo.quickbase.com/up/bpwdnv4gj/g/rf/ep/va/MoffitSignature.PNG">,
    [Case Supervisor User] = ToUser ("useremail"), <"img src= https://octo.quickbase.com/up/bpwdnv4gj/g/rg/ep/va/Mcnamara.PNG">,
    [Case Supervisor User] = ToUser ("useremail"), <"img src= https://octo.quickbase.com/up/bpwdnv4gj/g/rh/ep/va/Clark%20Signature.PNG">, null)

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------



  • 17.  RE: thumbnail image formula

    Posted 09-27-2019 14:47
    If(
    [Case Supervisor User] = Touser ("useremail"), "<img src=https://octo.quickbase.com/up/bpwdnv4gj/g/rf/ep/va/MoffitSignature.PNG>",
    [Case Supervisor User] = ToUser ("useremail"), "<img src=https://octo.quickbase.com/up/bpwdnv4gj/g/rg/ep/va/Mcnamara.PNG>",
    [Case Supervisor User] = ToUser ("useremail"), "<img src=https://octo.quickbase.com/up/bpwdnv4gj/g/rh/ep/va/Clark%20Signature.PNG>")

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 18.  RE: thumbnail image formula

    Posted 09-27-2019 15:01
    Perfect! Thanks Mark!

    ------------------------------
    Wallace (DHS) Yeboah
    ------------------------------