How to hide/fileds form another table

JVINAY
Tera Contributor

Hi
How can we hide comment and Olympus fields on cloud intake table
I have written client script to hide it on cloud intake table and these fileds stored on caas intake table but unable to hide it on cloud intake table and also check these 'u_Envi'(paas account) is exists in caas accounts or not.

 

 

Any one please assist these highly appreciated. 

1 ACCEPTED SOLUTION

Ok write onLoad client script

Var env= g_form.getValue("u_eninorment");

var ga=new GlideAjax("checkEnv");

ga.addParam("sysparm_name ","validateEnv");

ga.addParam ("sysparm_env",env);

Once we get response

if( answer=="true")

g_form.setMandatory('comment',false);

g_form.setVisible('comment', false);

 g_form.setVisible('Olympus', false);

 

 

in script include 

ValidateEnv:function ()

{

 

var gr = new GlideRecord("Cloud_intake_additional_fields");

 gr.addQuery('cloudaccountReqfield', this.getParameter('sysparm_env'); // Update correct fieldname of cloud acc req

gr.query();  

return gr.hasNext();

 

View solution in original post

4 REPLIES 4

Mani A
Tera Guru

can you share screenshot of those fields from cloud intake table?  and what exactly do you need with u_envi ?? 

 

onload CS:

g_form.setVisible('comment', false);

 g_form.setVisible('Olympus', false);

 

envi exist or not:

var gr = new GlideRecord('caas_accounts');

 gr.addQuery('u_Envi', passDynamically);

gr.query();

return gr.hasNext();

JVINAY
Tera Contributor

Hi Mani A ,

below Image  I have marked two fields 

1. Requires Olympus review?
2. Comment for Olympus review
 
The above two fields are visible in Cloud_intake_task table , But these fields are created/ stored in Cloud_intake_additional_fields table ( 2nd image )
 

1.png

 

3.png

we need to check u_eninorment ( CLOUDxxx3762) these cloud account store in Cloud_intake_additional_fields table or not , my requirement these cloud account stored in Cloud_intake_additional_fields table i need to hide Two fields.

FYR Attached (u_eninorment ( CLOUDxxx3762)

"I need to Hide two fields in Existing records only"

 

4.png

Ok write onLoad client script

Var env= g_form.getValue("u_eninorment");

var ga=new GlideAjax("checkEnv");

ga.addParam("sysparm_name ","validateEnv");

ga.addParam ("sysparm_env",env);

Once we get response

if( answer=="true")

g_form.setMandatory('comment',false);

g_form.setVisible('comment', false);

 g_form.setVisible('Olympus', false);

 

 

in script include 

ValidateEnv:function ()

{

 

var gr = new GlideRecord("Cloud_intake_additional_fields");

 gr.addQuery('cloudaccountReqfield', this.getParameter('sysparm_env'); // Update correct fieldname of cloud acc req

gr.query();  

return gr.hasNext();

 

JVINAY
Tera Contributor

Thanks @Mani A ,

 

I made some changes in the script , It's working...