You are viewing limited content. For full access, please sign in.

Question

Question

Possible to determine if task is assigned to individual

asked on July 22, 2018

I have a form that contains a link to a document for review and button for accepting or rejecting. The task is assigned to a team so needs to be "Assigned to self" before the buttons are available, but the link is part of a custom html and so is available before "grabbing" the task.

Is it possible to check if the task is assigned to an individual? So I can disable the link and display a note to make sure to assign the task to yourself first.

 

0 0

Replies

replied on August 1, 2018

Hi Boris,

Can you screenshot your Process Diagram and the User Task please? I think this should be automatically grayed out by default until the task is assigned to an individual.

 

Since the fields are most likely grayed out until the form is assigned, you can setup a javascript that will hide both buttons until one of the fields on your form is clicked on or changed - that would be the simplest solution.

I use this script in a lot of my forms that deal with Approve/Reject buttons because I have a "check" field that is a dropdown that asks if the form should be Approved or Rejected. Based on the answer it will either show or hide the appropriate button. In your case you will want to also insert 

$(".action-btn.Reject").hide();
$(".action-btn.Approve").hide();

right after the 1st line of code which means that both buttons will be hidden until the "check" is changed.
 

$(document).ready(function () {

  $("#q14").on("change", function() {  //when the field with the id q14 changes
   	 var check = $("#Field14").val();  //I called the variable "check"

   	 if(check == "App") { //if the "check" dropdown has value of "App" which is approve
  	   $(".action-btn.Reject").hide();  //hide the Reject button
     	   $(".action-btn.Approve").show();  //show the Approve button
  	       }
   	 if(check == "Rej") {
    	   $(".action-btn.Approve").hide();
       	   $(".action-btn.Reject").show();
   	       }
	});
});

Let me know if you have any questions!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.