Forum Discussion
6 Replies
Sort By
- ChrisSwirtz2Qrew CadetI just tried the same formula in a Rich Text Formula field and it's giving me the same error
var text URLGenAdd=URLRoot() & "db/" & [_DBID_PERIPHERALS] & "?a=API_GenAddRecordForm&_fid_15" & URLEncode ([Record ID#])&"&dfid=11" & "&z=" & Rurl();
------------------------------
Chris Swirtz
------------------------------ - DonLarsonQrew Commander
Chris,
That is it. Change the field type.
// Imagesvar text IMGLock = "<img src=https://images.quickbase.com/si/48/045-lock.png>";
// URL
var text URLGenAdd=
URLRoot() & "db/" & [_DBID_PERIPHERALS] &
"?a=API_GenAddRecordForm&_fid_15=" & URLEncode ([Record ID#]) &
"&dfid=11" & "&z=" & Rurl();
// UI
"<a href=" & $URLGenAdd & "' title=\"Click Me\">" & $IMGLock & "</a>"
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------- DonLarsonQrew CommanderChris,
By the way, change the image at the top to something that makes sense for your user base. I use that lock as default for status changes to records. It is probably nonsensical for your business case.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------ - ChrisSwirtz2Qrew CadetWell Don, that worked, thank you. Couple things though...
1. Is there way to show a button instead of that lock picture?
2. this type of field does not have the option to open in a new window like others do (unless you right click and select that from the menu, which they won't want to do). This is something my boss is definitely going to ask for.
------------------------------
Chris Swirtz
------------------------------- Quick_BaseJunkiQrew CaptainHi Chris,
I came across this thread in the Quick Base Newsletter and thought I'd chime in.
You can still use the Formula URL field as you desired (shown as a button and open in a new window). Just drop the variable portion of the formula you're using such as this...
URLRoot() & "db/" & [_DBID_PERIPHERALS] & "?a=API_GenAddRecordForm&_fid_15" & URLEncode ([Record ID#])&"&dfid=11" & "&z=" & Rurl()ā
There are also ways to format the rich text formula to open in a new window and show as a button, but it's likely not worth the extra coding if you just simplify the formula and use the Formula URL button.
Let me know if this helps šš
------------------------------
Sharon Faust (QuickBaseJunkie.com)
Founder, Quick Base Junkie
https://quickbasejunkie.com
------------------------------