Forum Discussion
MarkShnier__You
Qrew Champion
Maybe it's your lucky day. I am in a small airport waiting room with WiFi waiting for a helicopter to get me across the border into the US.
I don't think the technique is listed in the current Magic Buttons app. I think what happened is a while back Quickbase was talking about blocking the use <iframes>. There was a bit of an uproar from the community and upon further investigation they realize they did not have to be quite so draconian.
During that time Kirk Tracy removed that example from his Magic Buttons App. He may also have removed it because it relies on the goodness of Google to continue to provide this free utility.
So with the proviso that this technique relies on the good graces of Google, you can try making a formula Rich Text called [Report Link PDF Viewer formula]
If(
[Document Name] = "", "No File",
"<iframe src=\"https://docs.google.com/gview?url="&URLRoot() & "up/" & dbid() & "/a/r" &[Record ID#] & "/e99/v0" & "&embedded=true\" width=\"800\" height=\"2400\" frameborder=\"0\" target=\"_blank\"></iframe>")
// set the height and the width of the PDF preview window in the line above
//Replace 99 with the field ID of the file attachment.
Then make a report link field and configure both the left and the right matching fields to be that same report link formula field above. The viewer should be able to preview the usual kinds of documents including Excel, Word and PDF, and I believe Powerpoint.
Oh, and importantly as Mike stated, you need to set the checkbox on the file attachment field so it can be accessed without logging into Quickbase. Google needs to be able to look at your file in order to preview it. But since their motto used to be "do no evil", I'm sure your secrets are safe with them. But that is for you to judge. :)
Let us know how it goes.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
I don't think the technique is listed in the current Magic Buttons app. I think what happened is a while back Quickbase was talking about blocking the use <iframes>. There was a bit of an uproar from the community and upon further investigation they realize they did not have to be quite so draconian.
During that time Kirk Tracy removed that example from his Magic Buttons App. He may also have removed it because it relies on the goodness of Google to continue to provide this free utility.
So with the proviso that this technique relies on the good graces of Google, you can try making a formula Rich Text called [Report Link PDF Viewer formula]
If(
[Document Name] = "", "No File",
"<iframe src=\"https://docs.google.com/gview?url="&URLRoot() & "up/" & dbid() & "/a/r" &[Record ID#] & "/e99/v0" & "&embedded=true\" width=\"800\" height=\"2400\" frameborder=\"0\" target=\"_blank\"></iframe>")
// set the height and the width of the PDF preview window in the line above
//Replace 99 with the field ID of the file attachment.
Then make a report link field and configure both the left and the right matching fields to be that same report link formula field above. The viewer should be able to preview the usual kinds of documents including Excel, Word and PDF, and I believe Powerpoint.
Oh, and importantly as Mike stated, you need to set the checkbox on the file attachment field so it can be accessed without logging into Quickbase. Google needs to be able to look at your file in order to preview it. But since their motto used to be "do no evil", I'm sure your secrets are safe with them. But that is for you to judge. :)
Let us know how it goes.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
ZachShumate
3 years agoQrew Trainee
Thank you for hunting this down for me.
"<iframe src=\"docs.google.com/gview?url="&URLRoot() & "up/" & dbid() & "/a/r" &[Record ID#] & "/e99/v0" & "&embedded=true\" width=\"800\" height=\"2400\" frameborder=\"0\" target=\"_blank\"></iframe>"
in that field.
I also tried to just do this as a URL field and use the native quickbase ability to display in iframe. This did not display anything on the screen for some reason. The closest solution I have thus far is leaving it as a URL formula, displaying that URL as a button, and clicking that button to have it displayed in another tab. This does help avoid downloading the file every time but does not allow it to display directly on the form as needed.
Thanks,
Zach Shumate
770-500-6716
800 Progress Center Court
Suite 250
Lawrenceville, GA 30043
- MarkShnier__You3 years agoQrew ChampionDid you create the report link field that I ask led you to create? Or did you skip that step.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- ZachShumate3 years agoQrew TraineeI am not sure I follow what you mean by "Then make a report link field and configure both the left and the right matching fields to be that same report link formula field above"This is the formula I have in the Rich text field. Which I have labeled [PDF Viewer].If(
[Proof] = "", "No File",
"<iframe src=\"docs.google.com/gview?url="&URLRoot() & "up/" & Dbid() & "/a/r" &[Record ID#] & "/e6/v0" & "&embedded=true\" width=\"800\" height=\"2400\" frameborder=\"0\" target=\"_blank\"></iframe>")The file is located in FID 6. The name of that field is [Proof].Thanks,Zach Shumate770-500-6716800 Progress Center CourtSuite 250Lawrenceville, GA 30043- MarkShnier__You3 years agoQrew ChampionYou need to create a second field of type report link, configure it like I said and then put the Report Link field on the form.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------