Forum Discussion
DonLarson
6 years agoQrew Elite
Paul,
// Parameters
// URLs
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
- Build the parameters you need to use in the formula
- Build a number of URL statements as variables with the parameters you need
- Build a logic layer, that will determine which URL the user can execute.
- Create the User Interface for them to execute
// Parameters
var text Token ="abcdefghijklmnopqrstuv";
var text IMGButton = "<img src=https://images.quickbase.com/si/48/045-lock.png>";
// URLs
var text URLOne=
URLRoot() & "db/" & Dbid() & "?a=API_AddRecord&AppToken=" & $Token &
"&_fid_XX=" & URLEncode ([Record ID#]);
var text URLTwo =
"&_fid_XX=" & URLEncode ([Record ID#]);
var text URLTwo =
var text URLAPIAdd =
URLRoot() & "db/" & Dbid() & "?a=API_AddRecord&AppToken=" & $Token &
"&_fid_XX=" & URLEncode ([Record ID#]) &
"&_fid_XY=" & URLEncode ([XY])&
"&_fid_XZ=" & URLEncode ([XZ]);
and so on
// Logic
var text URLRun = If (
[Rule One]= True, $URLOne,
[Rule Two]= True, $URLTwo,
and so on )
// UI
"&_fid_XX=" & URLEncode ([Record ID#]) &
"&_fid_XY=" & URLEncode ([XY])&
"&_fid_XZ=" & URLEncode ([XZ]);
and so on
// Logic
var text URLRun = If (
[Rule One]= True, $URLOne,
[Rule Two]= True, $URLTwo,
and so on )
// UI
<a href=\"javascript:" & "$.get('" & $URLRun & "', function(){" & "location.reload();" & "});" & "void(0);\">" & $IMGButton & "</a>"
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------