Format Formula URL field
I have a formula url field that I'd like to show nothing or be blank if fid 6 (Status) = In or if Out show as a red button that says "Clock Out". Below is the current formula url field that I'm trying to modify.
var text URL = URLRoot() & "db/" & [_DBID_TIME_IN_OUT] & "?act=API_EditRecord"
& "&rid=" & [Record ID#]
& "&_fid_6=Out";
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$URL
& "&rdr=" & URLEncode($RefreshPage)
I've been looking at various posts that use additional variables to set the formatting, but I'm not sure how to incorporate what I've found into the above.
If Status = Out then use:
var text red = "<a style=\" text-decoration: none; background: #ff0000; border-radius: 5px; color: #fff; display: inline-block; width: 150px; text-align: center; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-seif; text-shadow: none; \">Clock Out"</a>";
If Status - In then use:
var text white = "<a style=\" text-decoration: none; background: #ffffff; border-radius: 5px; color: #000000; display: inline-block; width: 150px; text-align: center; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-seif; text-shadow: none; \">Clocked Out"</a>";
Thank you for the suggestion. Between what you posted and other references I found I was able to get this field formula to work as intended.
Thanks