Skip to main content
10-Marble
May 27, 2024
Question

Complete task button to be disabled using workflow variable

  • May 27, 2024
  • 2 replies
  • 2474 views

Hi all,

 

I have to create a check box in the change activity with string type and until the check box is ticked the complete task button should be disabled. please find the attached image for reference.

can anyone please provide a solution for this?

2 replies

22-Sapphire II
May 27, 2024

Hi @AK_10813265 

You can add an WF variable and check if the variable is set to true in the complete task transaction.

The user will be informed that something is wrong. 

if you need to return error message in the task completion  transition use following code 

 

String msg = "Can not complate the task without checking the check box";
java.lang.Exception exp = new java.lang.Exception(msg);
throw exp;

 

Complete Task Transition

Error Handling in Transitions

here is an example with required task comment

CS152927 - How to validate that the "Comments" field is not empty

you can use this alternative technique for your parameter

 

PetrH

10-Marble
May 27, 2024

hi,

 

thanks for the solution,

 

for creating wf variable here, should it be boolean variable or string variable? and in the display name i need that sentence which i had attached in the image, can you please tell me how to get that?

 

Thanks

Ak

22-Sapphire II
May 27, 2024

Hi @AK_10813265 

Test it. If you use string, how do you think it would be displayed? As a input field i guess.

Try to use boolean. 

 

Try to put the sentence to the display name of the attribute. 

maybe there could be different way how to put there so long text. 

PetrH

Community Manager
May 30, 2024

Hello @AK_10813265,

 

It looks like you have some responses from a community member. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.