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

Samaksh Wani
Giga Sage

Hello @Omkar Jori 

 

You need to use the Field Level Read ACL for both the fields --

 

 

 

var gr = new GlideRecord('table_name');
gr.addQuery('region', 'Europe');
gr.query();

while(gr.next()){
answer=false;
}

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

Hi @Samaksh Wani ,
Thank you for your reply

Could you check the below screenshot, Is I am doing something wrong ? It is not working
ACL: 

OmkarJori_2-1689934414145.png

OmkarJori_1-1689934359144.png

Note: The users having DPA role should not be able to see the records. 

Output:

OmkarJori_0-1689934243346.png

 

@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 !!

Hi @SANDEEP28 
it is working with this script. Thank you