Hiding Related Link based on condition

Blitz
Tera Expert

Hello, does anyone know how to hide a related link based on a condition?

Example: If state is in progress, then this related link will not show up. 

1 ACCEPTED SOLUTION

Vaishnavi Lathk
Mega Sage
Mega Sage

Hello,

 

  1. Configure the UI Action:

    • Name: Give your UI Action a descriptive name.
    • Table: Select the table where you want the related link to appear (e.g., incident).
    • Action name: Provide an action name (e.g., hide_related_link).
    • Show Insert: Check this if you want the link to be available on new records.
    • Show Update: Check this if you want the link to be available on existing records.
    • Condition: This is where you'll add the condition to hide the related link.

Sample Condition Script

Here's an example condition script that hides the related link if the state is "In Progress":

 

// Check if the current record's state is "In Progress"
// Replace `state` with the actual field name if it's different
// Replace `2` with the actual value for "In Progress" if different
current.state == 'In Progress';

 

Regards,

Vaishnavi Lathkar

View solution in original post

8 REPLIES 8

Simran Gadodiya
Mega Sage

Hi @Blitz 

Please follow below steps.

1. Go to UI action>>search for the name of related link.

2. Update condition part as 'state==2'.

 

Hope this helps you if yes accept it as solution and mark it as helpful.

 

Thanks.

 

Jitendra Diwak1
Kilo Sage

Hi @Blitz,

 

Right click on related link and it will open in different tab and set the condition as current.state=='2' || current.state=='2'. it depends on your requirement what state do you want hide.

 

Please accept my solution if it works for you and thumps up.

 

Thanks

Jitendra

Please accept my solution if it works for and thumps up.

Community Alums
Not applicable

Hi @Blitz ,

Your condition in the UI action determines when the UI action is displayed. In your case it sounds like you need something like this:

current.state == 'In-progress' (You can use the backed value)

 

 

Vaishnavi Lathk
Mega Sage
Mega Sage

Hello,

 

  1. Configure the UI Action:

    • Name: Give your UI Action a descriptive name.
    • Table: Select the table where you want the related link to appear (e.g., incident).
    • Action name: Provide an action name (e.g., hide_related_link).
    • Show Insert: Check this if you want the link to be available on new records.
    • Show Update: Check this if you want the link to be available on existing records.
    • Condition: This is where you'll add the condition to hide the related link.

Sample Condition Script

Here's an example condition script that hides the related link if the state is "In Progress":

 

// Check if the current record's state is "In Progress"
// Replace `state` with the actual field name if it's different
// Replace `2` with the actual value for "In Progress" if different
current.state == 'In Progress';

 

Regards,

Vaishnavi Lathkar