Table with URLs. Need to track the last time a URL was clicked. ## thoughts: set the link up to "touch" the record, which would update the modification date.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of Justin

Justin

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
This is simple. Display any record and then click the green button labeled URL. The URL will open in a new window and the view record page will reload with an incremented count. BTW, the following application lists my favorite videos from the awesome Loop School. It is going to be a great 2016 as we introduce the community to Category Theory for QuickBase Newbies!

Let Me Count The Clicks
https://haversineconsulting.quickbase.com/db/bkjpctwk8?a=q&qid=1

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=466


Notes:

(1) I only implemented the counting on the view record page but it is simple to extend it to any page.

(2) Category Theory Joke of the Day:

a comathematician is a device for turning cotheorems into ffee
http://math.stackexchange.com/questions/900390/joke-explanation-a-comathematician-is-a-device-for-tu...
Justin,
There are also native do,unions to this challenge using he techniques posted in an App in the Exchange called URL Formula Buttons for Dummies. Give that a read and post back if you have questions. I'm thinking you can use a URL formula button to update fields for the last clucked by and the date, and then redirect to the actual URL.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
http://quickbase.intuit.com/exchange/url-formula-buttons-for-dummies-v1/1803

Alas, no reference to Category Theory - the next big thing for QuickBase.
I did read the theory, but I didn't get the joke.  It sounds like I need to take a Phd curriculum to "get" the joke.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
> ... didn't get the joke ...

Someone approved my QuickBase Category Talk for Empower 2016!!!

https://intuitcorp.quickbase.com/db/bj94yxzax?a=q&qid=1&clist=6.19.20.23&slist=23&opts=so-D
Photo of Justin

Justin

  • 0 Points
Dandiebolt, did you modify the sample app in your first link after posting the link? I do not see a button titled "URL"
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
Yes. You have to *view* the record to see the URL button. I made this change because I only implemented the counting from the View page.

BTW, I think I implemented the very same counting function in the past to count downloads of file attachments.
Photo of Justin

Justin

  • 0 Points
Ah, I knew I saw that when I previewed before lunch. Im in the process of reviewing an app titled "Edit Record with Javascript Button", which appears to be using one of your scripts, as well. Im learning how to implement this example.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
FWIW, I misread your question and thought you wanted to count the number of times a link was clicked instead of logging the date/time of the last click. The same script can be modified to save the timestamp of the click instead of the incremented count. Simply change.
Photo of Justin

Justin

  • 0 Points
Dandiebolt, one of the other suggested solutions was to simply use the URL API and double them up. One for updating the record and one for the actual destination. Originally, I went down the road of a related table where I would create a new record and use the creation date to handle the clicks. Seemed messy but I didnt think you could advance a field using the URL API. Can you simply use the API to change a record to the same value over and over again and have it touch the record/modification date? That seems like an easier method than adding the js and the button?
"Someone"?

I suspect hackers at work.

https://intuitcorp.quickbase.com/db/bj94yxzax?a=q&qid=1&clist=6.19.20.23.1.2.3.4.5&slist=23&opts=so-D

The Last Modified By is Anonymous. It's curious that a real QuickBase employee did not Approve your talk.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
> ... one of the other suggested solutions was to ...

Yes you take that approach to *all* your problems and wander around till you bump into a native solution. But you will wind up navigating around all sorts of obstacles and hitting random limitations for which there is no native workaround. With script you never hit these limitations and there is always a solution.

Using script to solve your problems is like that idiom "Crossing the Rubicon". Once you start using script you will never go back to using native hacks.