Discussions

 View Only
  • 1.  How to Add Download Link to Email

    Posted 01-02-2019 21:07
    Hi,
    I am trying to add a download link to an email that gets generated automatically via button on a form. Basically, when a job has been reviewed, it needs to be sent to the supervisor to be approved along with the sketch of the job. Since the sketch itself(which is a file attachment field in the form) can't actually be attached as far as I know, I am trying to add a Download Link at the end of the email and the person approving the job can access the sketch immediately through the link.

    I am able to get the button and email generation to work but don't know how to generate the link. 

    Other Parameters: 
    ---the person approving the job is a quickbase user with access
    ---the field "Record ID#" has been deleted and the new key field is [WR #]
    ---there are two file attachment fields that could have the sketch. I need to send the link for the field [Sketch] if the field [Updated Sketch] is blank


    Here is a copy of my current code working within a URL - Formula field:
    ---------------------------------------------------------------------------------------
    var text URLONE = "MailTo:someone@someplace.com"

    //&"?cc=user2@domain.com; user3@domain.com; user4@domain.com" (in case I add a CC in the future

    &"&subject=WR for Approval"
    &"&body=WR "&[WR #] &" is ready for approval."&"%0A%0A";


    $URLONE
    ---------------------------------------------------------------------------------------

    Any help is appreciated!





  • 2.  RE: How to Add Download Link to Email

    Posted 01-02-2019 21:12
    Last year, Quick Base added a checkbox feature that will allow file attachments to be read via an email (downloaded) without having to log into Quick Base.  You simply need to encode the File Attachment field into your email notification.

    Go into the File Attachment Field and check the box to
    Allow Open Access [ ] Allow access to this file attachment from a Quick Base link without signing in



    Since your email is being sent to Users; why do you not build a custom email notification and have users "trigger" that notification via Quick Base; rather than building a separate email-generating formula.


  • 3.  RE: How to Add Download Link to Email

    Posted 01-02-2019 21:44
    If there are multiple reviewers would they all have to have this same exact email notification setup? I don't want the Sender to be "notify@quickbase.com." I just need to know how to reference the link to the attachment. Even referencing the record URL is fine except most posts I've seen involve referencing the [Record ID#] field, but ours has been deleted. I know each record I pull up has one because I can see it in the URL but I don't know how to reference it in the code if its not an official "field" anymore.



  • 4.  RE: How to Add Download Link to Email

    Posted 01-02-2019 22:32
    I got this to work (thanks to an old Mark Shnier post).  Even though you are using a custom key field; because the RID is still unique; you still use it in this formula-format.  I changed my test-table key field to a text field; and the link still worked.  You can probably play around with it to hide the URL with a cover text.  Also, your [Record ID#] might have been renamed; but it is a built-in field and cannot be deleted.  Sort your Field List by field ID# and look for the field numbered 3 to find out what it has been renamed.



    "<a href=\"MailTo:lhquickbase@gmail.com"
    &"?subject=Quick Specials Order"
    &"&body=Attention SHNIER Customer Service, please order the following for me "

    &"%0A%0A" & "My name is :______________________"
    &"%0A%0A" & "My Purchase Order is:______________________"
    &"%0A%0A" & "Special Instructions:______________________"
    &"%0A%0A" & "My Store name is :______________________"
    &"%0A%0A" & "My Tel number is :______________________"

    &"%0A%0A" & "here is a link to the inventory record in Quick Specials"

    &"%0A" &"https://laurahillier.quickbase.com/up/" & Dbid() & "/a/r" & [Record ID#] & "/e9/v0"

    &"\">"&"Order by Email"&"</a>"

    Additional Notes:
    ** field type = formula rich text **
    ** e9 ** - where 9 is the Field ID# of the file attachment field.

    You can probably play some more with the encoded URL to cover the URL with a link text.



  • 5.  RE: How to Add Download Link to Email

    Posted 01-02-2019 22:54

    I have verified that the link works using fields other than [Record ID#] which of course leads me to a missing WR # error, but when I try to use the RID I can't because the field [Record ID#] was deleted when this table was made(which I was not there for), so the RID technically exists but not as an actual reference-able field able to be used in brackets. Is there perhaps a way I can recover this field, so I can use it here?

    the red error text says, "Field [Record ID#] is not identified"

    Here's my exact code as well:
    ------------------------------------------------------------------------------------------
    var text URLONE = "MailTo:someone@someplace.com"


    //&"?cc=user2@domain.com; user3@domain.com; user4@domain.com"


    &"&subject=WR for Approval"
    &"&body=WR "&[WR #] &" is ready for approval."&"%0A%0A" &"%0A" &"https://pike.quickbase.com/up/"; & Dbid() & "/a/r" & [Record ID#] & "/e71/v0";


    $URLONE

    -------------------------------------------------------------------------------------------



  • 6.  RE: How to Add Download Link to Email

    Posted 01-02-2019 23:00
    All your error means is that field ID# 3 is not called [Record ID#].  Search for it in your field list first to identify the correct name of it.  It DOES exist, I promise you.


  • 7.  RE: How to Add Download Link to Email

    Posted 01-03-2019 12:19

    You were right! Someone just renamed it in the beginning and wasn't even on any forms or formulas anywhere, it is working great now - thanks for your help!


  • 8.  RE: How to Add Download Link to Email

    Posted 01-03-2019 12:23

    Sorry, I didn't even notice the last part of your post where you said it might have been renamed and still has field ID# 3; I guess I just started examining your code.