Skip to main content
Question

CODE DUMP: Email Help Button for Top Right Corner (that grabs page url)

  • March 31, 2023
  • 0 replies
  • 451 views

Forum|alt.badge.img+7

Have you ever had the email come across desperately crying out for help because "... the QuickBase App is broken..." as you stare at 45 separate apps wondering if they could try to be more vague... Well here is a button that can help. I use it on a bunch of my Apps and it auto emails me with the url of the exact page the user is on. It has been a god-send for me, and I wanted to share it with you all here, instead of doing a whole Empower presentation on it.

First create a html page. I creatively named mine 'TicketPage.html'. Then throw in this code (replace what you need to with your own information)
(This code has been updated to reflect the missing '?' after the destination email as pointed out by @Tim D below.)

<!DOCTYPE html>
<html>
<head>
<script>
let oldUrl = document.referrer;
var oldTable = oldUrl.substring(oldUrl.lastIndexOf('/')+1);
var newBody = oldTable+'testin';
function handleonload() {
window.open("mailto:support@myurl.com?subject=New%20Quick%20Base%20Ticket%20Request%3A%20APP%20NAME&body=---------------------------------------------------------------------------------------------%0D%0APlease describe your problem below %26 attach screenshots to this email.%0D%0A---------------------------------------------------------------------------------------------%0D%0ADESCRIPTION OF THE PROBLEM%3A%20%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A---------------------------------------------------------------------------------------------%0D%0APlease make sure that the Ticket Fields below are filled out correctly%3A%0D%0A---------------------------------------------------------------------------------------------%0D%0AQUICK BASE APP%3A%20APP%20NAME%0D%0ALINK TO PROBLEM%3A%20"+oldUrl+"%0D%0A", "_blank");
}
function ticket(){
    history.back();
    handleonload();
}

</script>
</head>
<body onload="ticket()">


</body>
</html> 

"+oldTable+"%0D%0A%0D%0AURL%3A%20"+oldUrl+"%0D%0A%0D%0ADESCRIPTION OF THE PROBLEM%3A%20", "_blank");
}
function ticket(){
    history.back();
    handleonload();
}

</script>
</head>

This is your email body. This is what will populate in a new email when the user clicks on the help button. 

Next we make the button!

Go to the Branding page and alter the Right Element and add your logo. make sure it is set to be open to view.

https://myurl.quickbase.com/up/btable42/g/rj/eg/va/HelpLogo.png


Then click the link icon to the right of the Right Element logo url. This opens up the Right Element Hyperlink.

 

Paste in the following, replacing the info with your own information.

https://myURL.quickbase.com/db/bpgtabl42?a=dbpage&pageID=15&target=_blank


Now save it all and you should see your new help icon at the top right corner of your app. 


I hope this can help a few of you out there. 



------------------------------
Meredith Moore
------------------------------

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • March 31, 2023

OMG. I'm definitely going to figure this one out.  I support dozens of clients who collectively have hundreds of applications and that means thousands of tables and zillions of records.  So like you say, they say they have a problem and they expect that I'm are reading their mind as to which record,  which table,  and which app it is.   They might ( or might not) give me a screen shot and I hate squinting to discern the URL.  So, I have to train everybody who contacts me to give me the link to the page they are on!

Thank you for posting this.  



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------


  • Quickbase Alumni
  • March 31, 2023

i had to change 

window.open("mailto:support@myurl.com&

to

window.open("mailto:support@myurl.com?

the first one was messing up the To part of the email.

This is very cool!! Thanks for sharing.



------------------------------
Tim D
------------------------------

Forum|alt.badge.img+9
  • Quickbase Alumni
  • April 1, 2023

I can't wait to use this! First thing I'm doing on Monday morning. 



------------------------------
Katlyn Allen
kallen@eatatjacks.com
------------------------------

Forum|alt.badge.img+15
  • Quickbase Alumni
  • April 2, 2023

Meredith,

Well done.  Very good feature.





------------------------------
Don Larson
------------------------------

  • Quickbase Alumni
  • April 3, 2023

Meredith:

Awesome feature!



------------------------------
CRM Services
WPL
------------------------------

Forum|alt.badge.img+5
  • Quickbase Alumni
  • April 18, 2023

Amazing! thanks for sharing
In addition to the update Tim mentioned, (changing from "&" to "?" before the subject)
I also found that url encoding the the origin URL was helpful to make sure that the email gets generated with the full URL including the full query string which is helpful to landing you on the exact record a user was on

New code page now looks like 

<html>

<head>
    <script>
        let oldUrl = encodeURIComponent(document.referrer);
        var oldTable = oldUrl.substring(oldUrl.lastIndexOf('/') + 1);
        var newBody = oldTable + 'testin';
        function handleonload() {
            window.open("mailto:support@yourcompany.com?subject=New%20Quick%20Base%20Ticket%20Request%3A%20App%20Name&body=---------------------------------------------------------------------------------------------%0D%0APlease describe your problem below %26 attach screenshots to this email.%0D%0A---------------------------------------------------------------------------------------------%0D%0ADESCRIPTION OF THE PROBLEM%3A%20%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A---------------------------------------------------------------------------------------------%0D%0APlease make sure that the Ticket Fields below are filled out correctly%3A%0D%0A---------------------------------------------------------------------------------------------%0D%0AQUICK BASE APP%3A%20App%20Name%0D%0ALINK TO PROBLEM%3A%20" + oldUrl + "%0D%0A", "_blank");
        }
        function ticket() {
            history.back();
            handleonload();
        }

    </script>
</head>

<body onload="ticket()">


</body>

</html>


------------------------------
Simon H
------------------------------