Forum Discussion
DonLarson
5 years agoQrew Elite
Ivan,
Give them an icon to look at
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
Give them an icon to look at
var text IMG = "<img src=https://images.quickbase.com/si/48/016-email_0.png>";
"<a href=\"javascript:" & "$.get('" & $URL & "', function(){" & "location.reload();" & "});" & "void(0);\">"& $IMG &"</a>"
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
- IvanWeiss5 years agoQrew CaptainDon, will that image show on the button? The button is supposed to say "Complete" as it is to Complete a task....
------------------------------
Ivan Weiss
------------------------------- DonLarson5 years agoQrew EliteIvan,
You can substitute any image or text in that position of the href.
Technically you do not even have to change the name, you can still call it IMG but that is not good practice. It is a declared variable of the type text.
Substitute
var text Message= "Complete";
and then stick $Message in the href.
Since you are setting fields 24 and 36, you can add more logic to allow the User to only execute it once.
If you add two more variables:
var text TaskComplete = "Task is Complete";
var text Executable = "<a href=\"javascript:" & "$.get('" & $URL & "', function(){" & "location.reload();" & "});" & "void(0);\">"& $IMG &"</a>";
Your logic then becomes:
If ( [FID24]<>"Complete", $Execute, $TaskComplete )
Substitute the real name of FID24 in the block. If it has been marked then the Executable will not show and the User will see the message "Task is Complete" and not have a button to push.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------