Forum Discussion
IvanWeiss
5 years agoQrew Captain
Don, will that image show on the button? The button is supposed to say "Complete" as it is to Complete a task....
------------------------------
Ivan Weiss
------------------------------
------------------------------
Ivan Weiss
------------------------------
DonLarson
5 years agoQrew Elite
Ivan,
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
------------------------------
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
------------------------------