Forum Discussion
EOMDevelepors
7 years agoQrew Captain
Thanks for the quick reply. I need this to be a rich text field since I am using more logic in this button. In a regular url button I can't change the text of the button based on the case.
I only shared the javascript part but here is my full formula:
var text editUrl =URLRoot() & "db/" & Dbid() & "?act=er&rid=" & [Record ID#];
var text url=
URLRoot()&"DB/"&Dbid()&"?A=API_EditRecord&apptoken=[mytoken]&RID="&[Record ID#]
&"&_fid_23="&URLEncode("today")
&"&_fid_19=Done";
If([CanMarkDone]=false,"<a class=\" Vibrant Alert \"href="& $editUrl &">"&[Why Can't Mark Done]&"</a>",
"<a class=\"Vibrant Success\" href=\"javascript:" & "$.get('" & $url &
"', function(){" & "location.reload();" & "});" &
"void(0);\">Mark As Done</a>")
I only shared the javascript part but here is my full formula:
var text editUrl =URLRoot() & "db/" & Dbid() & "?act=er&rid=" & [Record ID#];
var text url=
URLRoot()&"DB/"&Dbid()&"?A=API_EditRecord&apptoken=[mytoken]&RID="&[Record ID#]
&"&_fid_23="&URLEncode("today")
&"&_fid_19=Done";
If([CanMarkDone]=false,"<a class=\" Vibrant Alert \"href="& $editUrl &">"&[Why Can't Mark Done]&"</a>",
"<a class=\"Vibrant Success\" href=\"javascript:" & "$.get('" & $url &
"', function(){" & "location.reload();" & "});" &
"void(0);\">Mark As Done</a>")