KIRK TRACHY - Magic Buttons - Empower2017
KIRK TRACHY - Magic Buttons - Empower2017
KIRK TRACHY - Magic Buttons - Empower2017
"<span alt=\"" & ToText($numberstars) & " of 10 \" title=\"" & ToText($numberstars) & " of 10 \" class=\"NoWrap\">" &
If($numberstars >= 1, $star, $notstar) &
If($numberstars >= 2, $star, $notstar) &
If($numberstars >= 3, $star, $notstar) &
If($numberstars >= 4, $star, $notstar) &
If($numberstars >= 5, $star, $notstar) &
If($numberstars >= 6, $star, $notstar) &
If($numberstars >= 7, $star, $notstar) &
If($numberstars >= 8, $star, $notstar) &
If($numberstars >= 9, $star, $notstar) &
If($numberstars >= 10, $star, $notstar) &
"</span>"
Green Square Bar Graph (Press to adjust %)
This option allows you to press one of the 10 boxes and it invokes an API_EditRecord to
change the value of the % Project Complete field. This changes the number of green boxes
versus gray boxes.
Open the application and edit the field properties to view the code.
Smooth Performance Bar
var text redbox = ""&URLRoot()&"/up/" & [_DBID_DOCUMENTS] & "/a/r" & 6 & "/e7/v0"; // red
var text yellowbox = ""&URLRoot()&"/up/" & [_DBID_DOCUMENTS] & "/a/r" & 5 & "/e7/v0"; // yellow
var text greenbox = ""&URLRoot()&"/up/" & [_DBID_DOCUMENTS] & "/a/r" & 4 & "/e7/v0"; // green
var text graybox = ""&URLRoot()&"/up/" & [_DBID_DOCUMENTS] & "/a/r" & 3 & "/e7/v0"; // gray
var text orangebox = ""&URLRoot()&"/up/" & [_DBID_DOCUMENTS] & "/a/r" & 2 & "/e7/v0"; // orange
var text box = If([Performance]<0.6,$greenbox, If([Performance]<0.9,$yellowbox,$redbox));
var text widthval ="\"" &Min(Max([Performance]*200,0),200)&"\"";
var text widthvalbalance ="\"" &ToText(Max(0,Min(200,200-([Performance]*200))))&"\"";
"<img height = 18 width="&$widthval & "src=\""&$box&"\" title='Performance: " & [Performance]*100 & "%' />" &"<img height =
18 width="&$widthvalbalance & "src=\""&$graybox&"\" />"
Using CSS and formulas
"In-Progress","<div style=\"background-color:lightyellow;width:50\">In-Progress</div>",
"Completed","<div style=\"background-color:honeydew;width:50\">Completed</div>",null)
Status Text Color
Case([Color Status],
"javascript:void(copyMasterDetailButtonHandler('&sourceRID="&[Template
Selector]&"&destrid=" & [Record ID#] & "', 'bjq8b7xcx'))”
// Note the [Template Selector] field advising this button to import tasks from a specific
template
Tasks and Sub-Task Option
// and is invoked from the embedded report link of all the tasks on the project record
Change status to completed then display record