Set buttons of task visible when parent ticket is state=on hold

Ana39
Tera Contributor

Hi there, I am developing a new project in a custom table. The custom table has one child table to generate one task when state is "on hold".

The thing is that this parent ticket can come back and forward in the states, after the child-task creation.
I need the buttons of this child-task to only be visible and actionable when the state of the parent ticket is exactly "on hold".
When the state of the parent ticket is another one, I want the child-task to not display the buttons. 

Do you know if i can call the state of the parent ticket directly from the ui actions? 
Or maybe have another idea? 
Thanks in advance for your help 🌞

1 ACCEPTED SOLUTION

Nick Parsons
Mega Sage

In the Condition field on the UI action you can specify when it should display. So for the UI actions on the child table, you can specify a condition similar to this:

 

current.parent.state == 6

 

Where you would need to change parent from above to the field on your child table that references your parent and change 6 to the sys_choice value for the "On Hold" state on your parent table.

View solution in original post

4 REPLIES 4

Nick Parsons
Mega Sage

In the Condition field on the UI action you can specify when it should display. So for the UI actions on the child table, you can specify a condition similar to this:

 

current.parent.state == 6

 

Where you would need to change parent from above to the field on your child table that references your parent and change 6 to the sys_choice value for the "On Hold" state on your parent table.

Thanks for that! It worked!! 🌞

Sumanth16
Kilo Patron

Hi @Ana39 ,

You can use List Control on related list.

On the Task Related List,

Right Click on one of the headers and select Configure > List Control.

On the List Control Form add the Omit new condition Field (You may need to add this field by configuring form layout of List control form)

Add script in this field like below:

 

 

if(parent.state=='7'){//update onhold choice value
answer = true;
}else{
answer=false;
}

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Basheer
Mega Sage

Hi @Ana39 

You can specify the condition for the child table ui actions as below

current.u_parent.u_state == "your on hold value of the parent" 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.