Using %recLink% and %recID% in notifications

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered
I have an Open Notification that triggers when a user (who does not have access) submits a record. I want to include the ticket number in the notification. %recLink%  gives me this long, ugly URL and no Record#.  %recID% gives me a Record# but doesn't link back to the record.

I would like for the notification to show the Record# as a number and link to the record. Then when the user clicks on it, they can view the record without having to log into Quick Base.
How do I do this?Thank you
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb

Posted 4 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
You should be able to make a formula HTML field to use on the Notification which will appear as Record ID#, but would actually be a link to the record.

var text Words = ToText([Record ID#]);
var text URL = urlroot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];

"<a href=" & $URL & ">" & $Words & "</a>"

As for accessing the actual record without logging in, that will only work if you have the application set to be open to everyone on the internet as you need access permission to view records.

The one exception to that is that if you are trying to link to the user to download a document, then then a file attachment field can be set to allow a download without have access to the app.  But the hyperlink for that would be different than what I provided.
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
I have an Everyone on the Internet role set up and able to View All Records.
I don't see Formula - HTML as an option in the field list.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
:) sorry old habits.  That field type is now called formula Rich Text.  It was renamed by Quick Base about a year ago.
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
I created a Formula - Rich Text field but I'm not understanding how to complete the formula.

My URL is https://cokecbs.quickbase.com/db/bmyn95tvh
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
... but I wrote out the formula for you.
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
I pasted it in and it highlighted in yellow urlroot
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Did it save OK though?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
Ok, the yellow went away after I saved it. The email looks good, however, when I click on the link in the email it says QB can't understand the URL.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Can you post the resultant URL you see in the URL bar and also your formula?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
https://cokecbs.quickbase.com/db/bmvzyxtgs%20&

var text Words = ToText([Record ID#]);
var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];

"<a href=" & $URL & ">" & $Words & "</a>"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
The community forum messed up your post.  It may work if you use the PRE butotn and then paste in there.

also does the button work if you just click it on a record.  ie not from the email?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
https://cokecbs.quickbase.com/db/bmvzyxtgs%20&

var text Words = ToText([Record ID#]);
var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];

"<a href=" & $URL & ">" & $Words & "</a>"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Are you sure that is the full URL, it looks truncated.  And does the button work when you click it on a record?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
That is the URL I see when I click on the link in the email.Why would I click on it in a record. I want to be able to view the record without having to log in. I would have to log in to click on it in a record.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
:)
Re: why would I click on a record?

A: because I'm trying to help you debug the formula and I asked you to tell me if it works.

Maybe you need to go to Chris on this one.
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
I already went to Chris.I added the new field and clicked on it and nothing happened. I guess because I was already in the record. I don't understand what you are telling me. I'm asking for help because I don't understand.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
When you clicked the record did the screen refresh?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
No
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Can you confirm what the field type is?
Photo of Stephanie

Stephanie

  • 596 Points 500 badge 2x thumb
Got it, it's working now. Thanks.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
OK, thx for letting me know.