Skip to main content
Question

Using %recLink% and %recID% in notifications

  • July 10, 2018
  • 0 replies
  • 208 views

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
This topic has been closed for replies.

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.

  • Author
  • Quickbase Alumni
  • July 10, 2018
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.

:) sorry old habits.  That field type is now called formula Rich Text.  It was renamed by Quick Base about a year ago.

  • Author
  • Quickbase Alumni
  • July 10, 2018
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

... but I wrote out the formula for you.

  • Author
  • Quickbase Alumni
  • July 10, 2018
I pasted it in and it highlighted in yellow urlroot

Did it save OK though?

  • Author
  • Quickbase Alumni
  • July 10, 2018
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.

Can you post the resultant URL you see in the URL bar and also your formula?

  • Author
  • Quickbase Alumni
  • July 10, 2018
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>

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?

  • Author
  • Quickbase Alumni
  • July 10, 2018
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>"

Are you sure that is the full URL, it looks truncated.  And does the button work when you click it on a record?

  • Author
  • Quickbase Alumni
  • July 10, 2018
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.

:)
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.

  • Author
  • Quickbase Alumni
  • July 10, 2018
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.

When you clicked the record did the screen refresh?

  • Author
  • Quickbase Alumni
  • July 10, 2018
No

Can you confirm what the field type is?

  • Author
  • Quickbase Alumni
  • July 10, 2018
Got it, it's working now. Thanks.

OK, thx for letting me know.