Forum Discussion
DonLarson
6 years agoQrew Elite
Brianne,
If you can define the criteria mathematically then you can build a Formula Rich Text that will send the User anywhere you want. Assume you are worried about busy they are through out the day and are trying to manage peak brain power.
var text IMGFolderH = "<img src=https://images.quickbase.com/si/24/146-folder_h.png>";
// Variables
var text Early = "Early morning form";
var text MidDay = "Midday form";
var timeofday ManagerTime = Now();
// URLs
// HTML
var text HTMLEarly = "<a href=" & $URLEditEarly & "' title=\"Click Me\">" & $IMGFolderQ & "</a>";
var text HTMLMID = "<a href=" & $URLEditMid & "' title=\"Click Me\">" & $IMGFolderH & "</a>";
// Logic
If ( $ManagerTime< ToTimeOfDay("1:00 PM") , $HTMLEarly, HTMLMID )
You can control the form, the images and the criteria where to send the User.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
If you can define the criteria mathematically then you can build a Formula Rich Text that will send the User anywhere you want. Assume you are worried about busy they are through out the day and are trying to manage peak brain power.
// Images
// Variables
var text Early = "Early morning form";
var text MidDay = "Midday form";
var timeofday ManagerTime = Now();
// URLs
var text URLEditEarly =
URLRoot() & "db/" & Dbid() & "?a=er&rid=" &URLEncode([Record ID#]) &
"&dfid=2"&
"&z=" & Rurl();
var text URLEditMid =
URLRoot() & "db/" & Dbid() & "?a=er&rid=" &URLEncode([Record ID#]) &
"&dfid=10"&
"&z=" & Rurl();
// HTML
var text HTMLEarly = "<a href=" & $URLEditEarly & "' title=\"Click Me\">" & $IMGFolderQ & "</a>";
var text HTMLMID = "<a href=" & $URLEditMid & "' title=\"Click Me\">" & $IMGFolderH & "</a>";
// Logic
If ( $ManagerTime< ToTimeOfDay("1:00 PM") , $HTMLEarly, HTMLMID )
You can control the form, the images and the criteria where to send the User.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
- BrianneJacobsen6 years agoQrew TraineeThank you for the formulas. That is kind of what I want to do. Except if you are using the form in the Early Table you go to IMGFolderQ but if you are using the form in the Midday Table you go to IMGFolderH. It wouldn't be an if/then from the same form.
My problem is I'm not very familiar with programming and don't know how to specify which form to use in the formula. The formula I found
URLRoot() & "db/" & [_DBID_BUY_OUTS] & "?a=API_GenAddRecordForm&_fid_77=" & URLEncode ([Record ID#])& "&z=" & Rurl()
will only take me to the default form. Other than the form id number, I'm not sure how to differentiate between the two forms. And I don't know the terminology to modify the formula to say use this form instead using the form id number. Any help with that?
Thank you for your help. I hope I'm making a little sense.
------------------------------
Brianne Jacobsen
------------------------------- MarkShnier__You6 years ago
Qrew Legend
The syntax to specify a form is
&dfid=xx
So for example
URLRoot() & "db/" & [_DBID_BUY_OUTS] & "?a=API_GenAddRecordForm&_fid_77=" & URLEncode ([Record ID#])
& "&dfid=10"
& "&z=" & Rurl()
or do display a record
URLRoot() & "db/" & dbid() & ?"a=dr&dfid=10&rid=" & [Record ID#]
or do edit a record
URLRoot() & "db/" & dbid() & ?"a=er&dfid=10&rid=" & [Record ID#]
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- BrianneJacobsen6 years agoQrew TraineeThank you. That is what I needed.
------------------------------
Brianne Jacobsen
------------------------------