The CreatorCon Call for Content is officially open! Get started here.

Requirement to Hide the Incident Fields by validating a condition

Omkar Jori
Tera Expert

Hi All,
I have a requirement to Hide the Incident fields(from form and list view) from the table itself.

Condition is - Fields from incident ticket like short_description, description should be hidden, which are set to Region = Europe.

It should be a server side script like ACL so it should not a have any delay hiding the fields.

OmkarJori_0-1689930792287.png

Please let me know how I can achieve this requirement. 



1 ACCEPTED SOLUTION

@Omkar Jori add below code in script section. Replace u_region with your region field name.

 

if (current.u_region == 'Europe')
  answer = false;

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

View solution in original post

10 REPLIES 10

Riya Verma
Kilo Sage

Hi @Omkar Jori ,

 

Hope you are doing great.

 

solution to hide specific Incident fields based on the Region condition:

  1. Create a Business Rule that will execute whenever an Incident record is displayed on the form or list view.

  2. Check Region Condition: In the Business Rule script, we'll check if the Region field is set to "Europe" for the current Incident record.

  3. Hide Fields: If the Region is "Europe," we'll use a script to hide the desired fields like short_description and description from the form and list view.

 

(function executeRule(current, previous /*, gs */) {
    // Check if Region is set to "Europe"
    if (current.region == 'Europe') {
        // Hide fields from the Incident form view
        current.setDisplayValue('short_description', '');
        current.setDisplayValue('description', '');
    }
})(current, previous);

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma